How to plot intergratoion results into a table

syms f(t) tf f(t)=8*exp(-0.1*t); F(tf)=100-int(f(t),t,0,tf);
t = 0 hours to 24 hours I was wondering how I could have a table with column of hours going from 1-24 and a colum of F(tf) with the values

 채택된 답변

Birdman
Birdman 2018년 3월 16일
편집: Birdman 2018년 3월 16일

0 개 추천

Try this:
syms f(t) tf
f(t)=8*exp(-0.1*t);
F(tf)=100-int(f(t),t,0,tf);
tf=1:24;
Ftf=double(F(tf));
Tab=array2table([tf.',Ftf.'],'VariableNames',{'Hour','Value'})

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2018년 3월 16일

0 개 추천

out = table(tt,arrayfun(@(t0)100 - integral(@(tt)8*exp(-.1*tt),0,t0),tt),'v',{'Time','data'});

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

태그

질문:

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