How to provide input in txt format to a Simulink Model
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Sara Xie
el 3 de Ag. de 2017
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 comentarios
Ver también
Categorías
Más información sobre Prepare Model Inputs and Outputs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!