Respondida
Decreasing value in lookup table
You can flip your data, just use the flipud for column arrays and fliplr for line arrays.

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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 ...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 4

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 10

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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)

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

Respondida
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);

más de 11 años hace | 0

Respondida
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 ...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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]=...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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}...

más de 11 años hace | 0

Respondida
Help with minimum of a matrix
min(M(~isinf(M))

más de 11 años hace | 2

| aceptada

Respondida
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. ...

más de 11 años hace | 0

Respondida
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\' ...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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. ...

más de 11 años hace | 2

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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;...

más de 11 años hace | 0

| aceptada

Cargar más