Show values correctly in an array as output of a function

1 回表示 (過去 30 日間)
Santiago Rosas
Santiago Rosas 2015 年 12 月 7 日
回答済み: the cyclist 2015 年 12 月 7 日
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 Center および File ExchangeChemistry についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by