How to provide input in txt format to a Simulink Model
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
Is it possible to provide input data to a Simulink Model in txt format? If so, how can I do this? I'm using Matlab/Simulink R2015b 64-bit.
Thanks, Portolon
0 件のコメント
回答 (1 件)
Sara Xie
2017 年 8 月 3 日
Hi Tiago,
As I understand you are trying to load data in .txt file into Simulink model. The function textscan should be able to do this for you, it reads data from an open text file into a cell array. You can try put this function call into the model callbacks, for example 'PreLoadFcn' or 'InitFcn'. Check the documentation of model callbacks for how to use it.
To learn more about import txt file into MATLAB, check the domumentation of Ways to Import Text Files
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Prepare Model Inputs and Outputs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!