Why can't i use "from file" block in simulink
古いコメントを表示
i have a .mat file that i want to use in simulink using "from file" block
i put a "from file" and "scope" blocks into simulink and then connect them with each other.
i configured sample time in from file block as 1 that is equal to same sample time in .mat file and used fixed step ode3 solver with auto fixed-step size.
when i run, matlab gives no error, but i see this http://s7.postimage.org/y8ue6cmwr/matlab.png when i open scope
回答 (2 件)
Azzi Abdelmalek
2012 年 11 月 30 日
編集済み: Azzi Abdelmalek
2012 年 11 月 30 日
The problem is how you saved your data. Example
t=0:0.1:10; % vector time
y=sin(t) % t and y are line vectors
ty=[t;y] % ty should be a matrix with 2 rows
save filename ty
Now you can use your file in your simulink model. I think that you saved ty with two columns instead of 2 rows,
1 件のコメント
satish kumar
2020 年 8 月 11 日
Hello, i tried to load the data: t=[45, 67,8.9,6.7,5.5,3.2,5.6,7.9] into simulink using " from file " block in simulink. t is saved as .mat file. t is generated from matlab code. I am facing problem in loading all the points in simulink. the first data point in t, i.e. t(1)=45 is not loaded in simulink. others have been successfully loaded. Please help how to load data in array form like this without missing first point. kindly help.
カテゴリ
ヘルプ センター および File Exchange で Naming Conventions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!