フィルターのクリア

How to store output of dde23 command in workspace

1 回表示 (過去 30 日間)
Joy Mondal
Joy Mondal 2019 年 9 月 6 日
コメント済み: Jackson Burns 2019 年 9 月 7 日
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

採用された回答

Jackson Burns
Jackson Burns 2019 年 9 月 7 日
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 件のコメント
Joy Mondal
Joy Mondal 2019 年 9 月 7 日
編集済み: Joy Mondal 2019 年 9 月 7 日
Thank you Jackson
Jackson Burns
Jackson Burns 2019 年 9 月 7 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by