How to load data from one script to us to plot on another?

I want to load the data from one function script to another script to be plotted, how would I go about doing this?
function[c]=Main_Script(CO,N)
% hardcoded values are here
t(i+1)=t(i)+N;
T(i+1) = T(i)+N*(-0.5);
Sol(i+1)=KNO3inH2O(T(i+1));
if c(i)>Sol(i)
C=c(i)-Sol(i+1);
G=k_G*C^g;
I=L(1,:).^2*Density.';
dC=-3*k_v*D*G*Trap;
c(i+1)=c(i)+dC*N;
L(i+1,:)=L(i,:)+G*N;
else
G=0;
c(i+1)=c(i);
L(i+1,:)=L(i,:);
end

回答 (1 件)

James Tursa
James Tursa 2018 年 3 月 16 日

0 投票

Put the variables you want passed as outputs of the first function and inputs to the second function.

カテゴリ

ヘルプ センター および File ExchangeThingSpeak についてさらに検索

質問済み:

2018 年 3 月 16 日

回答済み:

2018 年 3 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by