Show values correctly in an array as output of a function

3 vues (au cours des 30 derniers jours)
Santiago Rosas
Santiago Rosas le 7 Déc 2015
I have several parameter as a function of time. Most of them come from differential equations I solved within my function.
I need to know how to obtain an output array for all those parameters, since there are ten or twelve orders of magnitude between the smallest and the greatest, so I almost always see many of those columns as zeros.
[out1, out2, out3, out4]=ProgramaPpal(t0,treac)
global T X2
T=353;
X1=0.0075;
X2=7.5;
X3=0.02;
X4=0;
[t,x]=ode23s(@DIFFS,[t0 treac],[X1 X2 X3 X4]);
DIFFS is the subroutine where all the diffential equations for my system are. After this I have a big for section where i calculate all the different parameters, and the output line is:
out1=[tao' beta'];
out2=[Dni' Dn'];
out3=[conve];
out4=[t Mni' Mwi' Mn' Mw'];
bUt i obtain only one 2 column wide array as output. Thank you in advance and sorry for my English.

Réponses (1)

the cyclist
the cyclist le 7 Déc 2015
You can use the sprintf command out tailor your output however you like.

Catégories

En savoir plus sur Chemistry 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