已回答
position of values in a matrix
If I understand what you are asking then you could use: Z=[23 24; 35 2; 12 19; 24 23; 12 15; 26 17]; M=[35 2; 12 15]; pos = f...

5 years 前 | 1

已回答
trouble with loops need help
As in your previous question, you can use the following bit of code. I have also updated the error in my answer to your previous...

5 years 前 | 0

已回答
assigning values to an array that already has values
Totally not an elegant answer but you could use something like: for i=1:numel(s) if(s(i)==1) s(i)==20; ...

5 years 前 | 0

| 已接受

已回答
How to exclude some additional points from plot legend?
An alternative to the answer of Shubham Gupta if you already have the figure plotted and you want to keep all of the points but ...

5 years 前 | 0

已回答
Time-dependent immunity and drug resistant SIR model
Assuming you have your BetaL and re functions setup correctly then there are the errors listed in the comment from Aquatris but ...

5 years 前 | 0

| 已接受

已回答
Remove one data-value from data set?
It is quite difficult to help without knowing the format in which you have your data stored. But, assuming that you have an arra...

5 years 前 | 0

已回答
remove occurrences of given characters in a string using find and []
If you absolutely have to use find then you could use function f=test(s,c) idx=find(s==c); s(idx)=[]; f=s; ...

5 years 前 | 0

| 已接受

已回答
how can I count up the number from a specific interval?
Assuming you want the number of elements greater than 8 rather than the sum of the elements greater than 8 then you can simply u...

5 years 前 | 0

已回答
Error Code Implicit Euler Method
The problem in the code itself is that in l(x+1)=l(x)-(((c*h)/3)*l(x+1))-16*m(x+1)*h; the l(x+1) term exceeds your matrix dime...

5 years 前 | 2

| 已接受

已回答
How can I arrange the y-values in xyz-data in ascending order?
You can use sortrows(A, column) where A is your array and column is the column you wish to sort.

5 years 前 | 1

| 已接受

已回答
ode45 system of equations
I have just been over this and found that t0=0; tfinal=20; y0=[500 10]'; tfinal-tfinal*(1+eps); [t,y]=ode45('Mo...

6 years 前 | 0

已回答
How can i solve the " Subscripted assignment dimension mismatch. Error in fi2 (line 12) u(:,1)= -sin(pi.*x) " ?
I have just run this code in R2016a and it did not produce an error when I chose a random set of input parameters. Was there a s...

6 years 前 | 1

| 已接受

已回答
I got an error Index exceeds matrix dimensions.
I have just run the code exactly as given in your problem description and it works absolutely fine for me using R2016a. It a...

6 years 前 | 0