Réponse apportée
avoding loops by vectorization
This should do it: outer_x_new = x_i'*ones(size(t))+d_del(1,:)'*cos(t);

presque 15 ans il y a | 1

Réponse apportée
Looping with indices that are not equally spaced
Actually, it will work. for idx = [ 1 -2 10 12.5 0 ] disp(idx) end Isn't MATLAB cool?

presque 15 ans il y a | 1

| A accepté

Réponse apportée
simple question in matlab
You need to start your index value in r with 1 or else it populates up to the index value specified with zeros. r = zeros(1,3...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
I want to represent my set of 2D points as colored regions like green for one type and red for other, anyone has any suggestions
You may want to check out the <http://www.mathworks.com/help/releases/R2011b/toolbox/stats/gscatter.html gscatter> command to se...

presque 15 ans il y a | 0

Réponse apportée
Adding new fields to a dataset array?
Try this: tmp.ID = 100*ones(size(tmp,1),1);

presque 15 ans il y a | 0

Réponse apportée
How to save 2 variables from function and use it in another function in MATLAB GUI?
If you are using GUIDE to create your GUI, then try using the <http://www.mathworks.com/help/releases/R2011b/techdoc/ref/guidata...

presque 15 ans il y a | 0

Réponse apportée
write a matrix to a text file
I wrote the following code which writes it line by line. Do you need the line breaks to be as they are in the original matrix? ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
z=xy
Or, you could use matrix multiplication with vectors: x = -6:6; z = x'*x

presque 15 ans il y a | 2

Réponse apportée
Finding values in a matrix for a given range
If your range is always going to be a consecutive range of values, then you can try: k = 1:9; r = 2:4; k = k(k>=min(r)...

presque 15 ans il y a | 0

Réponse apportée
Enumerated Data Type in MATLAB
Do you mean something like this? x = nominal([3:-1:1,1,1,3],{'Steel','Concrete','Aluminum'})

presque 15 ans il y a | 0

Réponse apportée
How to assign variables.
You can do this using cell arrays: x = [0.1 0.2 0.3 0.4 0.5]; for i = 1:5 X{i,1} = x(i:end) end Then, you ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
Lagrange and newton poly
You can try this function from the file exchange: <http://www.mathworks.com/matlabcentral/fileexchange/13151-lagrange-interpola...

presque 15 ans il y a | 0

Réponse apportée
Syntax help: Linearly spaced vector and simple algebra
t = 1790:2000; p = 197273000./(1+exp(1)-.0313*(t-1913.25));

presque 15 ans il y a | 0

| A accepté

Réponse apportée
Basic question: how to find range of index values
The following will find the maximum run and return the index values in that run to a variable named reqVals. I'm sure there's a...

presque 15 ans il y a | 0

Réponse apportée
Basic question: how to find range of index values
If you wish to find the corresponding index values where your variable mydata is equal to X, then you can use the <http://www.ma...

presque 15 ans il y a | 0

Réponse apportée
Average Position vs Time Graph?
If you know the model that you would like to use, and it is one equation for all of the data, then linear regression would be th...

presque 15 ans il y a | 1

Réponse apportée
Excel Add-in Deployment Problem
There are so many reasons why this could be happening ... you may have better luck by contacting technical support.

presque 15 ans il y a | 0

Réponse apportée
How to run MATLAB program in Clusters
Try a search within your school's website because your cluster configuration in MATLAB will be completely dependent upon the spe...

presque 15 ans il y a | 0

Réponse apportée
L2 norm minimization
The <http://www.mathworks.com/help/releases/R2011b/techdoc/ref/mldivide.html slash operator> is exactly what you need to solve y...

presque 15 ans il y a | 1

Réponse apportée
ODE- How to solve this equation??
The following code worked for me: dydt=@(t,y)(((g0*L-y)/tau)-((Pin/Esat)*(exp(y)-1))); [T Y]=ode45(dydt,[0 3],0); But...

environ 15 ans il y a | 0

Réponse apportée
reading MOV files
There is a bug report indicating this is problematic on older versions of MATLAB: <http://www.mathworks.com/support/bugreports/...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
matlab compiler
Here's a list of <http://www.mathworks.com/support/compilers/R2011a/maci64.html supported compilers> for the mac. If you wish t...

environ 15 ans il y a | 2

Réponse apportée
convert matrix
The results below will reshape from a 6D to a 4D array. If you don't want to use reshape, is there something else you have in m...

environ 15 ans il y a | 0

Réponse apportée
How do I genenate random (or pseudo random) numbers from a list with a specified distribution
Although you won't be able to generate the numbers from the exact data you have in y, you can still generate numbers using the d...

environ 15 ans il y a | 0

Réponse apportée
mesh size change in patternsearch
You can customize many of the options in patternsearch using <http://www.mathworks.com/access/helpdesk/help/toolbox/gads/psoptim...

environ 15 ans il y a | 0

Réponse apportée
Iterative Solvers in MATLAB
Try the <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/pcg.html pcg> function in MATLAB. From the <http://www.mathw...

environ 15 ans il y a | 0

Réponse apportée
link multiple data files
If all of the files live in the same directory, you can use the <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ls.ht...

environ 15 ans il y a | 0

Réponse apportée
check cell's contents and convert to matrix
Are you guaranteed that there will not be two adjacent string values in the input matrix? If so, then this should work for yo...

environ 15 ans il y a | 0

Réponse apportée
Extracting a number from an input (text file)?
I'll put my answer here since it's a little different, but Walter's response is definitely a lot more elegant. fid = fopen(...

environ 15 ans il y a | 0

Réponse apportée
check cell's contents and convert to matrix
The following code will find any strings in your input data and replace them with NaN values then converts the cell array to a m...

environ 15 ans il y a | 1

| A accepté

Charger plus