matrix look up issue
Time to learn about matrix indexing? [row] = find(T_T==RPM_val) First of all, this searches the ENTIRE matrix for a valu...

11 days ago | 0

| accepted

Simulink code seems not to use pc's proccessing power.
That seems to indicate you are only using one core. First, I might check maxNumCompThreads Then you might take a read...

11 days ago | 0

How to solve an equation with a variable that has multiple values.
No need to do anything special like having a different variable for each case! Use a vector. x = [0, 15, 30, 55, 85]; y ...

12 days ago | 0

In my a for loop where I eg need to go from 1 to 11, and want to make my step size 4 what happens when the computer have to make the last step and it goes over 11?
Why not try it? You can see the behavior from one line of code. 1:4:11 ans = 1 5 9 So if the incremen...

12 days ago | 0

How can I assign different colors to two-line plot title?
I don't think you can do so, at least not while using title. Title is not designed to set distinct colors for each line. Instead...

13 days ago | 0

| accepted

I would like to evaluate a partial sum for N=3,N=10,N=25 and at the same (or any N). How can this be done?
Oh, you made a serious effort. Lots of ways to do it of course. (BTW, NEVER use sum as a variable name!!!!!) Simplest is: ...

13 days ago | 0

Is it possible to calculate a 10- Dimensional integral
Is it possible to compute the 10-d integral shown here, or something like that, but not shown, and far more complicated? Almost ...

13 days ago | 1

| accepted

How to find the intersection points on two functions
Standard question: how to find the intersection(s) of two functions. 1. Subtract them. Where the difference is zero, there l...

14 days ago | 0

Why do my questions get very few views ?
Beyond what Walter said, your question may have a very ambiguous title. Like "Please help me". Nobody knows whether to bother lo...

14 days ago | 2

Matlab multiplication of two matrices in max-plus algebra?
You will need to write the code, overloading + and * (thus the functions plus and mtimes) for inputs of class double. Then you n...

16 days ago | 0

"Struct contents reference from a non-struct array object." What does this mean?
When you try to run the above code, why not read the warning messages too? This is what dsolve returns: S= dsolve(eqn1, eqn...

16 days ago | 0

I'm a noob. Can anyone make this simpler or more efficient?
Um, yes, I could make it "simpler" and perhaps more efficient. Who cares? Don't pre-optimize code without some reason to do so. ...

17 days ago | 1

unbalanced parenthesis on a problem
I would start by writing it using valid syntax for MATLAB. This is not that. 2cos(2pi((f(1)-f(2)/2)t)sin(2pi((f(1)+f(2)/2)t...

17 days ago | 1

Please , how can I find the center and the radius of the inscribed circle of a set of points
If I were going to solve the problem of finding an incircle for a general non-degenerate closed polygon, I MIGHT try the followi...

17 days ago | 0

Possibility of minus result in forecast?
Why not? Of course this is possible. Computers don't understand what you are doing. They have no concept of precipitation, or th...

18 days ago | 0

| accepted

Solving same symbolic equation but getting different results?
They are NOT the same equations!!!!!!!! There is a difference. In the first equation, MATLAB is told that dy is a constant. T...

19 days ago | 1

| accepted

i am trying to write a function.
Learn to use nargin, so you can test to see how many arguments were provided. Then you can put a branch in to do the calculation...

19 days ago | 0

Converting a fraction into a floating number
No. There is no need to use float. x = 2/5 x = 0.4 whos x Name Size Bytes Clas...

20 days ago | 0

PCA and data projection issue
Flipped signs is completely irrelevant. An eigenvector is not unique, since you can multiply it by any constant and still ha...

20 days ago | 0

Same Functions but Return Different Values
When you create a function handle, any constants in there are encapsulated, frozen in place at the values they took on when the ...

21 days ago | 1

Solving system of linear equations with boundaries, linsolve does not work
Linsolve DOES work, IF you use it properly. If not, well, garbage in, garbage out. Apparently you are telling us that {u1, f2...

21 days ago | 1

How do I plot a 3D surface bounded over the first octant?
It fails to do what you asked to do, because what you did has nothing to do with constraining it to the first octant. You genera...

21 days ago | 0

| accepted

combine or merge the signals
By concatenating them into an array. help horzcat Learn how to use square brackets. But this is basic MATLAB. So really,...

21 days ago | 0

How to solve system of 3rd order differential equations in Matlab
But nobody knows what you have tried. Just saying that you have tried lots of things helps nobody to help you, because that forc...

21 days ago | 1

How to connect minimum points into a line?
n = length(x); M = [x,ones(n,1)]; C = lsqlin(M,y,M,y); C = -20.501 1191.8 plot(x,y,'b.',x,C...

22 days ago | 2

| accepted

Different result on fmincon - same machine, Linux OS
There are many things in code that you THINK should be deterministic, but are in fact not. Many functions you might call can end...

23 days ago | 0

Exp Fit Error: Error using fit>iFit (line 340) NaN computed by model function, fitting cannot continue. Try using or tightening upper and lower bounds on coefficients.
Here is your model: y = (1-a)*exp(-x*b)+a*exp(-x*(c+b)) If you require that c be a positive number, then if you write th...

23 days ago | 0

How to solve this optimization problem (with matlab optimization toolbox)?
No other answer yet? This is probably homework, or some sort of contest puzzle. The optimum does not exist under the existing...

24 days ago | 0

Taylor Series for arctan
There are a few issues here that careful coding would clean up. For example, why do you need variables n AND counter, when both ...

25 days ago | 0