Show values correctly in an array as output of a function

3 visualizaciones (últimos 30 días)
Santiago Rosas
Santiago Rosas el 7 de Dic. de 2015
Respondida: the cyclist el 7 de Dic. de 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.

Respuestas (1)

the cyclist
the cyclist el 7 de Dic. de 2015
You can use the sprintf command out tailor your output however you like.

Categorías

Más información sobre Chemistry en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by