Effacer les filtres
Effacer les filtres

Input Excel Data into simulink without time.

5 vues (au cours des 30 derniers jours)
Santos García Rosado
Santos García Rosado le 22 Fév 2021
Hi Mathworks community!
I'm getting started on Simulink and I'm finding a couple of diffculties. My Simulink model is just mathematic and I don't need to simulate with time signals input, only numeric data (arrays, matrixes, scalars). I'll be using matlab function blocks with code of my own. The main issue I have is with the From Spreadsheet block. I've been reading some documentation about this block, and the first column of my excel file is always interpeted as a time variable and I can't seem to find a way to read the whole range as a Matrix.
I'm awared that I can use a constant input and write manually a matrix or array but I'll be working with large data, soy this ain't a valid solution for this case.
Can someone give me a hand?
Thank you!

Réponse acceptée

Sunand Agarwal
Sunand Agarwal le 25 Fév 2021
For the 'From Spreadsheet' block to consider the first column of your Excel file as a vector, you may open the dialog window by double clicking on the block and you should see an option called 'Treat First Column as'. If you set the option to 'Data', which by default is set to 'Time', the first column will be treated as a vector and it will do the trick.
Hope this helps.
  1 commentaire
Santos García Rosado
Santos García Rosado le 25 Fév 2021
Thank you Sunand! It worked perfectly.

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by