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

10 years 前 | 0

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 1

| 已接受

已回答
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 ...

10 years 前 | 0

已回答
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...

10 years 前 | 4

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 10

已回答
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...

10 years 前 | 0

| 已接受

已回答
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)

10 years 前 | 0

已回答
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...

10 years 前 | 1

已回答
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);

10 years 前 | 0

已回答
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 ...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 0

已回答
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]=...

10 years 前 | 0

已回答
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...

10 years 前 | 1

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 0

已回答
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}...

10 years 前 | 0

已回答
Help with minimum of a matrix
min(M(~isinf(M))

10 years 前 | 2

| 已接受

已回答
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. ...

10 years 前 | 0

已回答
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\' ...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 0

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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. ...

10 years 前 | 2

已回答
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...

10 years 前 | 0

| 已接受

已回答
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;...

10 years 前 | 0

| 已接受

加载更多