Risposto
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...

circa 3 anni fa | 1

Risposto
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...

circa 3 anni fa | 0

Risposto
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; ...

circa 3 anni fa | 0

| accettato

Risposto
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 ...

circa 3 anni fa | 0

Risposto
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 ...

circa 3 anni fa | 0

| accettato

Risposto
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...

circa 3 anni fa | 0

Risposto
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; ...

circa 3 anni fa | 0

| accettato

Risposto
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...

circa 3 anni fa | 0

Risposto
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...

circa 3 anni fa | 2

| accettato

Risposto
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.

circa 3 anni fa | 1

| accettato

Risposto
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...

circa 5 anni fa | 0

Risposto
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...

circa 5 anni fa | 1

| accettato

Risposto
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...

circa 5 anni fa | 0