Using a lookup table with mfile data

4 ビュー (過去 30 日間)
Ryan
Ryan 2012 年 2 月 5 日
回答済み: Sabin 2025 年 12 月 23 日 18:55
I'm making a model to model engine speed vs torque and created a m-file with the following code to put my values into arrays.
w=[700 800 900 1000 1100 1200 1300]
T=[40 42 50 56 70 90]
wint=700:10:1300
Tint=spline(w,T,wint)
Save flywheel wint Tint
The mfile was given to me by a TA. I then created the simulink diagram as also instructed but when I get to the portion to set the parameters for the lookup table im lost. First what lookup table should I use, and second my directions tell me to make the input=wint and the output=Tint. This makes sense but where do I enter these previously saved arrays and do I just put in wint and Tint or do I have to enter the individual values for each array. This would seem to defeat the purpose of creating them in the first place.
Thank You

回答 (1 件)

Sabin
Sabin 2025 年 12 月 23 日 18:55
In Simulink this would be a 1D Lookup Table: https://www.mathworks.com/help/simulink/slref/1dlookuptable.html

カテゴリ

Help Center および File ExchangeLarge-Scale Modeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by