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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 4

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 10

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 2

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 2

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

Mehr laden