Show values correctly in an array as output of a function

3 次查看(过去 30 天)
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.

回答(1 个)

the cyclist
the cyclist 2015-12-7
You can use the sprintf command out tailor your output however you like.

类别

Help CenterFile Exchange 中查找有关 Chemistry 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by