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

Antworten (1)

James Tursa
James Tursa am 16 Mär. 2018

0 Stimmen

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

Kategorien

Mehr zu ThingSpeak finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 16 Mär. 2018

Beantwortet:

am 16 Mär. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by