Reading formatted text file in simulink
Mostrar comentarios más antiguos
I have a Simulink model and I need to read a bunch of strings from an ascii text file. I wrote a Matlab script and found using the textscan function works well. However, when I tried creating a MATLAB function block in my model with the code, I get the following error: 'Function 'textscan' is not supported for code generation.
The only direct file input into Simulink I could find is the From File block, however I do not have a .mat file.
Is there a better way to read text files in Simulink? How can I work around the textscan error?
I'm fairly new to Simulink. Running version R2016a.
Respuestas (1)
Azzi Abdelmalek
el 13 de Jun. de 2016
add to your function
coder.extrinsic('textscan')
1 comentario
John Michel
el 13 de Jun. de 2016
Categorías
Más información sobre String en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!