How can I have Matlab Simulink autocode program read data from an external file?
I have a Simulink model that contains calculations that I want to have it perform on different external data files. I want to generate C-code autocode from the model that I can compile into an EXE application file. I would like the application to prompt me for the input data file to read and an output file to write the results. I’m having difficulty figuring out what I need to put in the model for the I/O interface and how to type cast all the I/O variables. I would really like some kind of an example for doing simple external file I/O just to get me started but i haven’t been able to find anything in my searches yet. Any hints or suggestions would be appreciated – thank you!I have a Simulink model that contains calculations that I want to have it perform on different external data files. I want to generate C-code autocode from the model that I can compile into an EXE application file. I would like the application to prompt me for the input data file to read and an output file to write the results. I’m having difficulty figuring out what I need to put in the model for the I/O interface and how to type cast all the I/O variables. I would really like some kind of an example for doing simple external file I/O just to get me started but i haven’t been able to find anything in my searches yet. Any hints or suggestions would be appreciated – thank you! I have a Simulink model that contains calculations that I want to have it perform on different external data files. I want to generate C-code autocode from the model that I can compile into an EXE application file. I would like the application to prompt me for the input data file to read and an output file to write the results. I’m having difficulty figuring out what I need to put in the model for the I/O interface and how to type cast all the I/O variables. I would really like some kind of an example for doing simple external file I/O just to get me started but i haven’t been able to find anything in my searches yet. Any hints or suggestions would be appreciated – thank you! matlab, simulink, encoder, file i/o, external data MATLAB Answers — New Questions