Réponse apportée
MATLAB in unexpected places
From the Acknowledgements section of _Spectral methods in MATLAB_ by Lloyd Nicholas Trefethen: "... there is a brass plaque ...

plus de 14 ans il y a | 1

Réponse apportée
Difficulty opening MATLAB file
I get the same problem, so maybe it is corrupt. You should try contacting the authors.

plus de 14 ans il y a | 0

Réponse apportée
Curve fitting - periodic function
You could try selecting "Sum of sin functions" for the type of fit.

plus de 14 ans il y a | 0

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

plus de 14 ans il y a

Réponse apportée
Random sample without replacement
Here is a recursive function that will return one row of your matrix |C|: function y = randsampleWithoutReplacement(populat...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
ode15s
If you are solving something like [t,x] = solver(odefun,tspan,y0) and you want the time derivative at each point |t(i)|,...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Is dynamic interpolation of input of function for 'quad' integration possible?
Given that your data are irregularly spaced, you may have to use interpolation after all. If your points are |(xdata,ydata)|, yo...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
ode15s
You could use <http://www.mathworks.com/help/techdoc/ref/deval.html deval>. *EDIT*: Here is a modified version of the example...

plus de 14 ans il y a | 0

Réponse apportée
Is dynamic interpolation of input of function for 'quad' integration possible?
Any increase in accuracy based on interpolating |a| and |b| would probably be illusory. If your points are regularly spaced, you...

plus de 14 ans il y a | 1

Réponse apportée
Finite-Sum Function
|S_N| is the output, but the function name is |S|. Use, e.g., S(10) (you'll need to input a number).

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
fmincon not optimizing over one variable
If your function has zero derivative with respect a variable, it won't vary that variable.

plus de 14 ans il y a | 0

Réponse apportée
Trouble with ez-plot
The syntax of your command is wrong. This is how you do it: f = @(sig) sig.^3-.120*sig.^2-11.8*sig-(-844); ezplot(f,[-200,...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Triple Numerical Integration with function boundaries
Here is a sketch of the approach: First, define your function to be integrated, e.g., f0 = @(x,phi1,phi2) 1./(h1(phi1,ph...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Convert matrix into the tensor
This is not a tensor, which has a specific meaning. If you had the same number of experiments per substance, you could turn it i...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Problem with optimization using fminunc + GradObj
You have more errors in your gradient. The correct gradient is G = [-600*x(2)*x(1)^2 + 600*x(1)^5 - 2+2*x(1) ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Funny situations while helping others on MATLAB Answers
I like this exchange: Q: hello, please send me the* speech database* for my project titled,"automatic speaker recognition" th...

plus de 14 ans il y a | 1

Réponse apportée
Question About bar plot
Yes, by splitting your bar plot into two. Here is a simple example: % First bar plot xdata = 1:9; ydata = rand(9,1); b...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Save command: List of variables to save can vary
Here is how to do it with cell arrays: a = rand; d = rand; w=rand; condition1=logical(randi([0 1],1)); % This is just for ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
PLOT problem
I think you are trying to do something like this: x = 1:100; c = cos(x); plot (x,c)

plus de 14 ans il y a | 0

Réponse apportée
Passing both the the variable name and value to a function
You can use <http://www.mathworks.com/help/techdoc/ref/inputname.html inputname> inside the function to find the names of the va...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
Converting a cell to string
Use <http://www.mathworks.com/help/techdoc/ref/char.html char>.

plus de 14 ans il y a | 0

Réponse apportée
Problem with optimization using fminunc + GradObj
It's a sign error. The gradient should be G = [-2 + 2*x(1) - 400*x(2)*x(1) + 400*x(1)^3 200*x(2) - 200*x(1...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Getting better accuracy with Lsqcurvefit
The problem may be that your two parameters have such very different magnitudes, so the fit can probably not discriminate the se...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
toolbox functions do not work
It may be that you have the toolboxes installed, but don't have the license to run them. See <http://stackoverflow.com/questions...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to have output in an input format?
It would take a little programming. Your example could be done with disp(['var1 = [',num2str(var1),']']) but you'd need ...

plus de 14 ans il y a | 0

Réponse apportée
how to add a moving average filter
See <http://www.mathworks.com/help/techdoc/ref/filter.html filter>.

plus de 14 ans il y a | 0

Réponse apportée
What is missing from MATLAB?
An equivalent of the UNIX command |wc| that allows one to determine useful information about the size of a file before reading i...

plus de 14 ans il y a | 1

Réponse apportée
Problem with quad2d integration
When in doubt, just put a dot in front of all |^|'s, |*|'s and |/|'s. Also, next time you ask a question, it would help if you p...

plus de 14 ans il y a | 1

Réponse apportée
non-rectangular text file upload
This will do it: fid = fopen('data.csv'); tline = fgetl(fid); while ischar(tline) ind = find(tline==',',1,'first'); ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Time data conversion
Here are two conversions you could do: datevec('2012-01-25 16:11:10 645','yyyy-mm-dd HH:MM:SS FFF') datenum('2012-01-25 16...

plus de 14 ans il y a | 1

Charger plus