Réponse apportée
How can I store the output value from each for loop?
Hi The file = files' statement is quite crucial, but should be correct like this. The foor loop (by default) will loop throug...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Plot with loop work only for the last
The matlab documentation is really good for that: <http://www.mathworks.com/help/matlab/ref/plot.html?searchHighlight=plot Pl...

environ 10 ans il y a | 0

Réponse apportée
How can I adjust a controller?
Hi Your basic procedure is correct, but you mixed up the parameters a bit. I admit that this is a bit confusing, but the str...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
How to assemble time series by smaller time series (or windows)
Could you specificy what you want in the end? A timeseries object? A separate data matrix for each case? If you want to conca...

environ 10 ans il y a | 0

Réponse apportée
Getting Real & Imaginary Numbers From Nyquist(Sys)
Hi The values in RE and IM are, as you correctly assume, the real and imaginary values (of the vector w, which would be the 3...

environ 10 ans il y a | 0

Réponse apportée
Finding inverse cross-correlation
If I interpret your description of "inverse cross-correlation" correctly, wouldn't that just be the cross-correlation with one o...

environ 10 ans il y a | 0

Réponse apportée
Error using sub2ind out of range subscript
Your code runs without error for me. Why do you have the variables declared as global? This is something to avoid whenever po...

environ 10 ans il y a | 0

Réponse apportée
how to replace consecutive 4 elements of an array with the largest element among every 4 consecutive element ?
One possibility would be the following: 1. reshape your vector as a 4xN matrix a=[12 58 16 56 23 7 8 45 53 56 12 32 ...

environ 10 ans il y a | 1

Réponse apportée
y(t)= a*t*exp(-a*t); z=summation(A(i)*y(t-T(i)).summation from i=1 to J. i need to partially differentiate z wrt A() and T()
And you want to do this symbolically? Looks to me that this would be a possibility: 1. create a variable for each summation i...

environ 10 ans il y a | 0

Réponse apportée
How to extract only alphabets from mixed string
Hi You can use fancy functions like regexp or so, but this is my suggestion: str = 'BA9K90L'; % pick out letters ...

environ 10 ans il y a | 0

Réponse apportée
Bessel function of the first kind
Hi interesting question, thanks. The short answer is: there is (almost) nothing wrong with the code, except the *abs*, wh...

environ 10 ans il y a | 1

Réponse apportée
what's the difference between writing 1.0 and 1. or 2.0 and 2. ?
There is not difference in matlab. Sometimes, people like to write "1." instead of 1 to make it easier to port to/from other pro...

environ 10 ans il y a | 0

Réponse apportée
function on separate interval
This means that you have defined a function with an output (in your case the variable f), but have not assigned it. This would h...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
I need help plotting a range of stream lines in my velocity field plot.
Hi Nice plotting! I believe *contour* might help, something like %stream function psi = y.^2 - x.^2 - x -0.25; con...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
Check two string data without carriage return symbol
Why not just take the first row? I.e. Psvoltage = deblank(fscanf(obj1)) %, '%d', 4) if ( ~isempty(Psvoltage) ) ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
non linear equation, help me solve this please
Hi 1. What does the error say? _"The expression to the left of the equals sign is not a valid target for an assignment."_ ...

environ 10 ans il y a | 0

Réponse apportée
My code uses the Euler scheme to solve an equation.How would I convert it to Runge Kutta scheme to make it faster for convergence.
Hi Not sure if I understand the question correctly, but you basically already have the answer, and most of the code you need....

environ 10 ans il y a | 1

Réponse apportée
How to access variables with incremental names using for loop index?
You could use "eval", i.e. for i = 1:3 eval(sprintf('limb_ph%i_avg=mean(limb_ph%i)',i,i)); end but eval should be ...

environ 10 ans il y a | 0

Réponse apportée
How can I add a value to my array?
To answer your question, you *could* just concatenate them, e.g. x = [ 2 3 ]; % now add a 1: x = [ 1 x ]; ...

environ 10 ans il y a | 0

Réponse apportée
Only one Figure in plot
You can specify which figure you want to plot in bringing up the figure before (either through it's number or the figure handle)...

environ 10 ans il y a | 0

Réponse apportée
Generating random ones and zeros controllably
You can generate a vector ( or matrix if you like ) with the desired number of zeros and ones, and then permute them randomly us...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
The command svmtrain in LIBSVM matlab package takes input for values of C and g in quotes as a string value. I want to use the single code svmtrain repetitively by having different values for C and g. But how to do it?
What you essentially need to do is concatenate strings (and convert the number into a string). Let's say you want to test the ve...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Integration of fft data
Two possibilities: a) First use inverse fft to get acceleration, then integrate. b) Use integration property of Fourier Tr...

environ 10 ans il y a | 0

Réponse apportée
How to read a data file line by line running a loop?
I don't think you should read it line by line. Just read the whole thing, and _process_ it line by line. 1300 rows are peanuts, ...

environ 10 ans il y a | 0

Réponse apportée
how to exclude above and below of average of min and max peaks?
You can select certain parts of a vector using logical indices. Example: Remove everything > 2 a = [ 1 2 3 4 5 ]; in...

environ 10 ans il y a | 0

Réponse apportée
how to declare parameter data type in a function?
Hi Short answer: cast with e.g. int8 Longer answer: As you probably know, Matlab is quite relaxed when it comes to data...

environ 10 ans il y a | 0

Réponse apportée
How to make a plane rotating with roll, pitch and yaw?
Hi you can use hgtransform objects. _Andrew Gibiansky_ has a simple quadrotor simulator which uses them, you could have a loo...

environ 10 ans il y a | 0

Réponse apportée
merging files using for loop
The above method should work. However, instead of copying the content into a string ( which might be HUGE for several files ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Adjacency matrix of a network to Distance matrix (Two -Hop)
Possible solution, see comment section for details: A = [ 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Finding the Transfer Function of resonance system
There are several ways of doing this, but I'm guessing you would like to actually build the circuit and get the transfer functio...

environ 10 ans il y a | 1

Charger plus