How can i get the value of start and end of an integral save it in table simulink

2 ビュー (過去 30 日間)
joms
joms 2019 年 9 月 8 日
編集済み: joms 2021 年 1 月 21 日
I would like to get the start of curve and end of each curve and save it to matrix not in time series datahere are the points that i would like to get only.
Desired Output
Outputlabel={"Start", "end" }
Output=[0.1 10; 11 15 ; 3 145]
Screen Shot 2019-09-08 at  4.png

回答 (1 件)

joms
joms 2020 年 11 月 30 日
編集済み: joms 2021 年 1 月 21 日
m = mdf('CANape.MF4')
data = read(m, 1, m.ChannelNames{1});
mdfds = mdfDatastore('buf_011.MF4');
data=readall(mdfds);
mdfds = mdfDatastore({'CANape1.MF4','CANape2.MF4','CANape3.MF4'});
data = readall(mdfds);
time = [ 0 0.0010 0.0021 0.0031 0.0041 0.0053 ] ;
torque = [ 0 1.22 1.32 1.32 1.42 1.60] ;
dt = 0.001 ;
ti = min(time):dt:max(time) ;
iwant = interp1(time,torque,ti)
create timetable and use below
TT_out = retime(TT, 'Regular', 'TimeStep', 0.001);

カテゴリ

Help Center および File ExchangeLinearization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by