フィルターのクリア

How to print ODE45 results into a table with specific time periods

3 ビュー (過去 30 日間)
Rich
Rich 2014 年 4 月 5 日
編集済み: Star Strider 2014 年 4 月 5 日
Hi I am working on a matlab program that solves a few differential equations to find the results of a heat transfer problem.
I have the differential portion completed but I am having trouble printing out the data to a table
options= odeset('RelTol',1e-6,'AbsTol',[1e-6 1e-6]); [t,M]= ode45(@dMdt_project4_66,tspan,initialvalues,options);
where dt= 0.1; dmax=70; dmin= 0; tspan= dmin:dt:dmax;
I want to print the results every second into a table. Any suggestions? ODE45 help doesnt explain.
Thank you

回答 (1 件)

Star Strider
Star Strider 2014 年 4 月 5 日
編集済み: Star Strider 2014 年 4 月 5 日
With your tspan, if you define ‘tp’ as the times you want to plot and ‘Mp’ as the ‘M’ values you want to plot:
tp = tspan(1:10:end);
Mp = M(1:10:end);

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by