Matlab basic operations
I have recently found some strange behaviour of MatLab and I would appreciate if somebody explained me why it happens and how to overcome this problem.
Please run the code:
x1 = [1/3 repmat(2/3,1,10)]';
x2 = [repmat(2/3,1,10) 1/3]';
I get results false.
Why are the sums not the same although the difference between x1 and x2 is only the order of elements?
Don't feel bad, you are only the 1 millionth person to discover the wonders of floating point arithmetic. Have a read:
http://matlabwiki.mathworks.com/MATLAB_F...basic questions in matlab
I am new in matlab and i would like help to understand the next lines:
//// At this i understand that build a matrix coef(npanels,npanels)
//// Build a vector rm(npanels)
coef(end+1,:)=1;rm(end+1)=0; %prevents singular matrix - sum of panel
strengths on closed body is zero
//// Add a new row to prevent singularity, so my question i...MatLab Basics Question
Hello. I'm extremely new to MatLab. I'm a student... and I have an assignement that requires me to use it. No, I'm not asking for "Can someone do my homework?" I need help with the basics. My professor gave my class a 5 minute tutorial, and then gave us this crazy assignment.. and I'm lost. How do I set up the following in MatLab? I have no clue...
The S-MF with two parameters l and r (l<r) is an S-shaped open-right Membership FUnction defined by:
| 0, for x<= 1,
S(x;l,r))= ---+ 2((x...Basic matlab question
It is an easy question I guess but I need help
I have three columns: day, hour and data
1 4 22
1 8 120
1 12 510
1 17 245
2 3 37
2 10 311
3 14 362
3 18 131
3 21 26
I have another table with max and min hour for each day and I would like to keep just the data between that max and min and transform the rest in NaN. Each day have different number of data. Can anyone help me?
On Aug 20, 12:51=A0pm, Fabian <fabianbat...@hotmail.com> wrote:
> It is an easy question I guess but I need help
> I have three columns: day, hour and data
&...Basic Matlab question?
1. Why isn't 3 divided by 2 equal 1.5 in matlab?
2. In matlab, why is 2/3 equal to 0? Isn't 2/3 equal to 0.667?
That's what my Matlab says :)
So what exactly is your problem?
the answers are not abnormal in matlab. try it again properly.
"Thomas Cruz" <firstname.lastname@example.org> wrote in message <email@example.com>...
> 1. Why isn't 3 divided by 2 equal 1.5 in matlab?
> 2. In matlab, why is 2/3 equal to 0? Isn't 2/3 equal to 0.667?
"martin M&...matlab basic questions
Pretty new to matlab and also to signal processing.
I have few basic questions. Would appreciate if someone answers them ...
1) Is matlab used only for analysis? Can I design a filter and then export the complete design in c
2) I saw that one of the tutorial on filter and it seems to export mainly co-efficients, parameters of a filter. But what about the algorithm in C that is used to process the input? Do we have to write them on our own.
3) Some of the advanced functions like image processing have in build functions. If I wanted to create a standalone function outside of matlab,...basic operations in matlab
Does anyone know if or how I can do the following in
Suppose that I have a number in exponential notation, as
a = -5.16016e+073
Is there a way, in matlab, to extract the 73. Is there some
function that when I input a I can output the exponent of
the number, like in this case it would output 73.
"Januj Juneja" <firstname.lastname@example.org> wrote in message <g0i21q$m7t
> Dear Sir/Madam,
> Does anyone know if or how I can do the following in
> matlab ?...How does matlab work in this issue ? a matlab principle question
I have an ODE solver computing the temperature every month during a year
this script will do the job
where Tic is the intial temperature and J loops represents the months
Now the question is about matlab principle and how does it work with the initial condition? i mean
as the last temperature of the 1st month is the begining temperture of the 2nd month and the last temp. of the 2nd month is the begining temp. of the 3rd month and so on. Do i need to write a command to do ...Matlab Architecture Question
I am interested in hearing ideas about the best ways to create "modules" in matlab?
The goal is to have one interface, where I can easily switch routines, and have different versions of the routine run.
For example, suppose I have a routine to recognize license plates. It needs to be initialized, and then on subsequent calls it needs to be run.
Later one, I want to swap the license plate recognition file, with another one, and have the new one take effect.
Is there an established 'best practice' for this in Matlab?
[ I'm upgrading to Matlab 2009a, from 2005&...Basic question on DLLs in Matlab
Does anybody know a good tutorial about how to implement DLLs written
in C++ in Matlab? I'm also a beginner in C++, so I practically don't
know anything about how to write a DLL (apart from some very basic
introduction). I'd be especially interested in how to include
functions in the DLL, and how to call them in Matlab. Can be as
simple as a standard IO-command. Any help is welcome, so as to get an
idea how this works fundamentally.
...Basic question about Matlab guide
I have a matlab 7.0.1 on windows xp machine, and I was trying to learn
guide from the example in the manual, basically there are three push
buttons in a panle to choose the type of graph (surf, contour, mesh)
and a pop up menu to choose different data, and a axis. I've
encountered strange problems.
The first time when I finish the gui design and test it, the figure
(axis) does not show up, also push buttons are covered by the panel and
can not be seen. I have set figure visible.
Then I decided to start over, this time I were able to see all the
components initially, but after I choose c...Plots in MATLAB
I am attempting to plot the yaw velocity gain for an automobile system in MATLAB. This is straightforward - just an equation to calculate it and then plotting G_yvg on the y-axis against v_x on the x axis. I would like my values for v_x to be from 5 to 50. I attempted to run the code below:
-- Code start --
% Bicycle Model for car A - The understeer car
m = 1669;
I_z = 3144;
l_F = 1.178;
l_R = 1.567;
l = l_F + l_R;
C_F = 59410;
C_R = 50730;
K_us = 9.409*10^-3;
g = 9.81;
v_x = 5:1:50; % This needs to be values between 5 and 50
G_yvg = v_x/l+(K_us*v_x^2/g);
...Basic questions about Matlab/NNT
I am a newbie in case of artificial neural networks. Please answer
I need to implement digit classification (OCR) with numbers 0..9 as
output and approx. 3800 training images. I also have ~1800 test images.
I found the OCR example shipped with Matlab and played with it. It uses
a feedforward NN with backpropagation (newff).
Here my questions:
How can I determinate the optimal number of training images? If I use
3800 it takes some time to train. I played with subsets of 200, 400,
500, 800 images and the results where not linear increasing. Should I
"re-train"...basic MATLAB question #2
I have a script where I input specific columns from a ascii file and perform a function on them. Is it possible to set the name, of the file I import, as some kind of variable so that I don't have to write the filename over and over for each time I import it?
This is how I do it now:
x = dlmread('asciifile', '\t', 'A1..A100');
y = dlmread('asciifile', '\t', 'B1..B100');
I want to be able to do something like this:
filename = 'asciifile'
x = dlmread('filename', '\t', 'A1..A100');
y = dlmread('filename...