Effacer les filtres
Effacer les filtres

I want to iterate through each value of matrix through loop

2 vues (au cours des 30 derniers jours)
Zamra Sajid
Zamra Sajid le 2 Nov 2016
Commenté : Jan le 2 Nov 2016
Parameters2; % loads parameter values from parameters.m
ch=0.5; % changing factor
VAll = [rx rx*(1-ch) rx*(1+ch); %V(1:,)
ax ax*(1-ch) ax*(1+ch); %V(2:,)
ry ry*(1-ch) ry*(1+ch); %V(3:,)
ay ay*(1-ch) ay*(1+ch); %V(4:,)
dx0 dx0*(1-ch) dx0*(1+ch); %V(5:,)
dy0 dy0*(1-ch) dy0*(1+ch); %V(6:,)
dx1 dx1*(1-ch) dx1*(1+ch); %V(7:,)
dy1 dy1*(1-ch) dy1*(1+ch); %V(8:,)
cx cx*(1-ch) cx*(1+ch); %V(9:,)
cy cy*(1-ch) cy*(1+ch); %V(10:,)
ea ea*(1-ch) ea*(1+ch); %V(11:,)
es es*(1-ch) es*(1+ch); %V(12:,)
rs rs*(1-ch) rs*(1+ch); %V(13:,)
rya rya*(1-ch) rya*(1+ch); %V(14:,)
ryq ryq*(1-ch) ryq*(1+ch); %V(15:,)
rm rm*(1-ch) rm*(1+ch); %V(16:,)
A A*(1-ch) A*(1+ch)]; %V(17:,)
dx1 =VAll(7,2);%or any of the above parameter
pars = [rx ax ry ay dx0 dy0 dx1 dy1 cx cy ea es rs rya ryq rm A k];
%% Initial values
Init = [x0I, x1I, y0I, y1I, aI, sI, yqI, xmI];
%% Solve ODE's the usual way
options = odeset('RelTol',1e-4,'AbsTol',1e-8); % Tolerances
[ts, cs] = ode15s(@Cancer_eqs,tspan,Init,options,pars); % Solve ODE's
save results.mat ts cs;
% %% Figures
Driver_Cancer_Figures
  1 commentaire
Jan
Jan le 2 Nov 2016
Your code is hard to read. Please remove the empty lines and use the "{} Code" button to apply a proper format. The description of your problem is lean an we have to guess, which variable you are talking of. If the code is not readable in addition, answering gets harder than necessary.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by