Effacer les filtres
Effacer les filtres

How to store output of dde23 command in workspace

1 vue (au cours des 30 derniers jours)
Joy Mondal
Joy Mondal le 6 Sep 2019
Commenté : Jackson Burns le 7 Sep 2019
function ddex1
global k1 k2 k3 zf wf a b g d f m w wn
a=-0.01; b=0.05; g=14.4108; d=3.2746; f=0.01;m=0.89663; w=3.06309;
wn=3.06309;wf=3.1;zf=0.1; k1=-0.1; k2=1;k3=-0.5;
sol = dde23(@ddex1tde,[0.1],@ddex1histd,[0, 1000])
% figure;
plot(sol.x,sol.y(1,:))
xlabel('time t');
ylabel('solution y');
I got the output in the form of graph from this command. Now I want to store the output data to workspace

Réponse acceptée

Jackson Burns
Jackson Burns le 7 Sep 2019
I can't run this on my machine without the function ddex1histd, but here's my best idea:
Have the function return sol and assign it to some value in your workspace.
function sol = ddex1
global k1 k2 k3 zf wf a b g d f m w wn
a=-0.01; b=0.05; g=14.4108; d=3.2746; f=0.01;m=0.89663; w=3.06309;
wn=3.06309;wf=3.1;zf=0.1; k1=-0.1; k2=1;k3=-0.5;
sol = dde23(@ddex1tde,[0.1],@ddex1histd,[0, 1000])
% figure;
plot(sol.x,sol.y(1,:))
xlabel('time t');
ylabel('solution y');
Function call:
out = ddex1()
  2 commentaires
Joy Mondal
Joy Mondal le 7 Sep 2019
Modifié(e) : Joy Mondal le 7 Sep 2019
Thank you Jackson
Jackson Burns
Jackson Burns le 7 Sep 2019
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by