writing signal values over time to an excel sheet using Matlab Function Block
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello everyone. I have been a little stuck with a small problem for some days now. My problem is that i have a simulink model, which consists of a Matlab Function Block, some signals as input for the matlab function block and an output. Matlab function block should take the signals as input signals, calculate the values of those signals over a period of time, and output these values in the form of a table in an excel sheet.
The variables that will be storing the values of the signals need to be persistent variables. Because matlab function block can only access each signal at each time as far as I know.
I have attached the images of the simulink model and the example excel table. Please take a look on these pictures and let me know if anyone has an idea how to do this. Thank you for your time.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156070/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156071/image.png)
3 comentarios
Swarooph
el 1 de Sept. de 2016
"values of the signals over time will keep on changing" Does this mean during a simulation or between simulations? Either way, I still don't understand why you cannot use a To Workspace block to log all the signals (that do change with time, you can log them as structure with time array) and once the simulation is over, run a MATLAB command to copy it to an Excel Spreadsheet.
Respuestas (0)
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!