Réponse apportée
Decreasing value in lookup table
You can flip your data, just use the flipud for column arrays and fliplr for line arrays.

plus de 11 ans il y a | 0

Réponse apportée
Rearranging text file order
I'm not 100% sure if I understood your question correctly, but this might be what you need: >> name={'A';'B';'C'}; >> s...

plus de 11 ans il y a | 0

Réponse apportée
Find value of x, from max y (graph)
I'd actually prefer the following: ... vel = diff(y)./diff(x); [maxvel,ind]=max(vel); plot(x(1:end-1),vel,x(ind),maxv...

plus de 11 ans il y a | 0

Réponse apportée
How do you separate the roots of a function?
Actually, this is exactly how you should do it. Don't assign it to variables like r1, r2. It will be much more difficult to work...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How do I solve solve a function, y=f(x), for x given y?
I didn't check the equation in detail, but if you know the y value you're looking for, you basically just need to find the root ...

plus de 11 ans il y a | 0

Réponse apportée
generate random numbers with exact mean and std
I agree with the two earlier posts that exact mean/std values and randomness are contradictory. However, the data seems to be me...

plus de 11 ans il y a | 4

Réponse apportée
How can I export figure as png?
Did you try another renderer? I can't really explain a lot about it, but I think I once had a similar problem (though everything...

plus de 11 ans il y a | 0

Réponse apportée
how can i combine two vector into one vector by the follwoing pattern ( and not use "For" Loop which take a lot of time , since this vector is a Million of elements ):
One option a3=[a1; a2]; a3=a3(:)'; This only works if a1, a2 are line vectors. Otherwise, take the transpose of each i...

plus de 11 ans il y a | 10

Réponse apportée
ode solvers & loops for various values
The ode45 function provides the opportunity to detect "events" which would be appropriate in your case. So, put the ode45 part i...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Creating a simple plot
You need element-wise multiplication: x = -3:3; y = x.*exp(-x.^2); %<-- here, I added the point plot (x, y)

plus de 11 ans il y a | 0

Réponse apportée
error in eval command
100 % agree with Oleg. Do not use these statements: http://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-create-va...

plus de 11 ans il y a | 1

Réponse apportée
Count equal values in multiple matrices
I guess you don't want to overwrite X2. Introducing X3, the easiest way is: X3 = 1+(X1==X2);

plus de 11 ans il y a | 0

Réponse apportée
Use numbers in a matrix to call vector row
P2=P(samparray); should work. 1+round(prand*999) isn't the best way to get randomly distributed integers between 1 and ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
please explain function [dum,z]
from the Matlab help: C = min(A,[],dim) [C,I] = min(...) So, [sq_dist1;sq_dst2] is an array (most likely 2-dimension...

plus de 11 ans il y a | 0

Réponse apportée
Splitting a vector up into unequal sections seperated by zeros
Not sure if this question is finally answered as Bran seems to still struggle with an error. Anyway, I just wanted to mention th...

plus de 11 ans il y a | 0

Réponse apportée
Matlab Array Formation From Data Set
Ha, got it: X=[300 100 200];Y=[10 20 30]; A=[300 10 1;100 20 2;100 30 4;200 30 5]; [x,y]=meshgrid(X,Y) [C,ia,ib]=...

plus de 11 ans il y a | 0

Réponse apportée
solve a issue regarding saving a variable to mat file.
This error (Error using save Unable to write file ecgta1: permission denied.) says that you don't have writing permission at the...

plus de 11 ans il y a | 1

Réponse apportée
Remove duplicated rows in a matrix
unique(array,'rows') can do the job: >> A=[1 2;3 4;5 6;1 2] A = 1 2 3 4 5 6...

plus de 11 ans il y a | 0

Réponse apportée
Taking input data from multiple files
myfilename = sprintf('outputfinal%d.txt', k) will produce e.g. outputfinal1.txt To get the zeros in the filename, use...

plus de 11 ans il y a | 0

Réponse apportée
To read a cell array containing multiple cell array.
Do you mean something like firstcell=myarray{1}; Or, in a loop, for cnt=1:length(myarray) thiscell=myarray{cnt}...

plus de 11 ans il y a | 0

Réponse apportée
Help with minimum of a matrix
min(M(~isinf(M))

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
indexing a variable in matlab
I read this question as if you want to get variable names such as Meas_1, Meas_2 etc. That's not how you should work in Matlab. ...

plus de 11 ans il y a | 0

Réponse apportée
How to save images using for loop?
There's nothing wrong using imwrite, there's something wrong how you create the file name. Just use ['E:\Aneurysms\Images\' ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
reading mutiple images one by one without overwriting
Because you have to tell imread _where_ to find the file. figs=dir('C:\Users\swathi\Desktop\image*.gif'); for cnt=1:len...

plus de 11 ans il y a | 0

Réponse apportée
undefined function 'minus' for input arguments of type table
With readtable, you get a Table object. This is the reason for the errors. If you use dlmread instead, you'll directly get an ar...

plus de 11 ans il y a | 0

Réponse apportée
custom equation fitting and plotting
What part of the task is the problem? Read the files: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to remove a plot (if it exists) before replotting? Matlab GUI ButtonDownFcn
I would create such a point right at the start of the program. Use the coordinates (0,NaN) to keep it invisible and save the han...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to find r square in matlab
rsquare is not a function which is delivered with Matlab. Either you have to write it by yourself or you find some source (e.g. ...

plus de 11 ans il y a | 2

Réponse apportée
Help with MATLAB help example.
This is an example of xlsread and its ability to apply a function on the data before returning the data. There is no need to...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
legend color is not match
Huh, there's a lot to comment. 1. To your question: Let me copy the important lines: set = 768; length = 1:1:lines;...

plus de 11 ans il y a | 0

| A accepté

Charger plus