Answered
How to access zero index in the following code?
Do you mean that you cannot use an if test? It is not possible to test for when i==1, and use a slightly different formula? Hmm....

10 years ago | 0

| accepted

Answered
Sine Regression with NonLinearModel.fit
You are making the mistake of providing poor starting values. You simply needed to provide a set of more intelligent starting va...

10 years ago | 0

| accepted

Answered
Optimization problem with 2 unknowns
In terms of the optimization, you don't have TWO variables. You have two unknown matrices, containing 933*2488+933*933 total unk...

10 years ago | 0

Answered
How can I find the mixed partial derivatives using Matlab?
You would differentiate with respect to y twice, so the second derivative, and once with respect to x. Essentially two calls to ...

10 years ago | 0

Answered
Hi, everyone i have an array of 500 random values i want to plot a pdf from this kindly help me. I am uploading array file.
help hist Though, it will probably be rather a waste of time. hist(T_Ag,100) <</matlabcentral/answers/uploaded_file...

10 years ago | 0

| accepted

Answered
how i can return the index of an array?
Time to read the manual, given a basic problem. Either of these tools will do what you want: help find help ismember

10 years ago | 1

| accepted

Answered
Calculate t maximums in single vector
Sort them. Then take the first 5 elements from the sort. WTP? No. It is not ONE single command. Not an option. Of course, not...

10 years ago | 0

Answered
solving trigonometrique equation ?
You will never get an analytical result here. vpasolve(g1) ans = -0.04489097131344154920928045475445

10 years ago | 0

| accepted

Answered
Why I get different results evaluating the same matrix usign the symbolic toolbox and the numerical approach?
Simple. Because the symbolic TB uses higher precision arithmetic than does double. On some problems this matters. As well, the s...

10 years ago | 0

Answered
How can I plot a correct fft of cosine wave?
What did you plot? Hint: look at the code you wrote: k=0:fs:11*fs; stem(k,y) What is plotted as the x axis? The numbe...

10 years ago | 0

Answered
Curve fitting: Difference fit, nlinfit, fitlnm
The differences are simple. These tools mainly come from different toolboxes. That is really the main difference. Curve fitting ...

10 years ago | 2

| accepted

Answered
Curve fitting: What does LAR do?
I don't understand what is confusing. The sum of the absolute values of the residuals is clearly NOT least squares, thus a minim...

10 years ago | 1

| accepted

Answered
how can I get matlab/simulink contain thermodynamics libraly?
Start writing. Nobody can give you code from toolboxes that you do not own. Or upgrade your copy of MATLAB (and the correspon...

10 years ago | 0

Answered
Undefined function or variable f when using solve function
Did you ever tell MATLAB in advance that f is a symbolic variable? help syms

10 years ago | 0

Answered
Measure whether two curves are significantly different from each other
I'll argue that you cannot assign any statistical significance to the difference between two sets of points as curves, when you ...

10 years ago | 1

Answered
Command "cluster" with big data: it used to work fast but now it works slow
Since we have absolutely nothing to go on about the actual data, I can only guess. Clustering tools usually use random starts...

10 years ago | 0

Answered
Generalized Linear Regression to Find Heat Capacity
help polyfit

10 years ago | 0

Answered
Is there a quick way to calculate rank of a binary sequence?
For any vector of length N, most of the matrices you would try to form are not even validly rectangular matrices. Thus for a vec...

10 years ago | 0

Answered
Why does it take forever to solve my optimization problem (using ode45 and fmincon)?
How can we know what you did that now causes the problem? Since we do not see your code, we cannot read your mind. You changed s...

10 years ago | 0

Answered
Question about a Logistic Equation
You are correct that Nrab is the problem. You need to learn about the element-wise operations, {.* ./ .^} , all designed to hand...

10 years ago | 0

| accepted

Answered
Is there a way to manually input an objective function value to find the next iteration x values?
What do you mean that it is built into MATLAB? No, PSO tools are NOT part of MATLAB proper. There are PSO toolboxes you can down...

10 years ago | 0

Answered
converting .001 .002 file
Get a list of all the files. dir will do that. help dir Then, rename each file, using a loop over the files. Just create...

10 years ago | 0

Answered
Problem with polyfit and polyval
You start off doing a bad thing in these two lines:. GFit = polyfit(Freq,G,length(Freq)); PhaseFit = polyfit(Freq,Phase,...

10 years ago | 1

Answered
I have a 3D volume shape and I would like to take only the surface of the shape to change it to triangular mesh.How can i do this?
A 3-d tetrahedral mesh is composed of tetrahedra, each of which is non-overlapping, but they will all share some facets. The fac...

10 years ago | 0

Answered
How to make sure only a single instance of MATLAB is running on Mac
I don't think this is something you can fix or control. I recall having that happen ages ago, in a galaxy and OS version far,...

10 years ago | 0

| accepted

Answered
Surface Fitting with a high order polynomial custom equation
A really, really, really bad idea. Massively bad. You are trying to fit a polynomial model with roughly a hundred terms or so...

10 years ago | 0

Answered
How Matlab computes trigonometric functions?
NO. MATLAB does not do a table lookup. To compute things like a cos or sin, one first does a range reduction, to ensure the a...

10 years ago | 1

| accepted

Answered
Finding difference of an array in circular manner
d = diff(res); d(end+1) = d(1) - d(end); WTP?

10 years ago | 0

Answered
Kindly help with fsk demodulation
Hmm. I'll accept that you THINK you passed in a number greater than 1. This is the calling sequence, copied directly from th...

10 years ago | 0

Load more