Simulink - Excel
Mostrar comentarios más antiguos
Hello
Does anyone know if it's possible to run an excel file in Simulink? I have a column with a variable in excel, and don´t know if there is a block that I can get in simulink to run this variable.
Regards
Respuestas (6)
Guy Rouleau
el 28 de Abr. de 2011
Editada: John Kelly
el 22 de Ag. de 2014
1 voto
The Signal Builder block allows you to import a signal directly from Excel:
Arnaud Miege
el 27 de Abr. de 2011
0 votos
What do you mean "run this variable" and why do you need to do that? Depending on what you want to do, it might easier to just import the data in MATLAB using xlsread and then use the From Workspace block to use the variable in the Simulink model.
HTH,
Arnaud
2 comentarios
Pat
el 5 de Sept. de 2011
i have a variable b which consists of values [ 2 3 4].if i enter b to pass these values to fuzzy logic controller as input i get an error.can any one help
the error is 'expression b does not evaluate to valid FIS'
Sajjad Khan
el 10 de Feb. de 2022
I have been facing the same problem. Could some one explain it?
Tiago
el 27 de Abr. de 2011
0 votos
9 comentarios
Arnaud Miege
el 27 de Abr. de 2011
Read the documentation. It depends on the format of your data in the workspace, but typically something like [time_vec data_vec], where time_vec is the name of your time vector and data_vec is the name of the your data vector. Both vectors need to be the same size, and need to be column vectors (Nx1).
Tiago
el 27 de Abr. de 2011
Arnaud Miege
el 27 de Abr. de 2011
It's not particularly difficult. What's your data like? Can you copy and paste the output of whos at the command line? What error message are you getting?
Tiago
el 27 de Abr. de 2011
Gia
el 27 de Abr. de 2011
Hi Tiago,
The variable data should contains all numerical values of your excel file -- a time column and a data column.
You can create a look up table using time as x-axis. Feed the clock as input.
Tiago
el 27 de Abr. de 2011
Arnaud Miege
el 27 de Abr. de 2011
Assuming your time values are in the first column, you just need to enter data in the block (if data is the name of your variable).
Tiago
el 27 de Abr. de 2011
Arnaud Miege
el 28 de Abr. de 2011
Instead of simin, just enter the name of your variable, i.e. 'data' in your case (without the quotes) and that's all there is to it!!
Tiago
el 28 de Abr. de 2011
0 votos
3 comentarios
Arnaud Miege
el 28 de Abr. de 2011
Why do you want to do simin x constant? What are you trying to achieve? You may want to look at the Simulink tutorials at:
http://www.mathworks.co.uk/academia/student_center/tutorials/simulink-launchpad.html
and also read the documentation.
Tiago
el 28 de Abr. de 2011
Arnaud Miege
el 3 de Mayo de 2011
Did you have a look at the tutorials I suggested? You really need to get up to speed with the basics of Simulink. Have a look at the following snapshot:
https://picasaweb.google.com/lh/photo/e5izz3VrVIYHyZnnq3oc6A?feat=directlink
Tiago
el 2 de Mayo de 2011
0 votos
Tiago
el 1 de Jun. de 2011
0 votos
1 comentario
Arnaud Miege
el 1 de Jun. de 2011
Again, have a look at the snapshot I mentioned in my earlier comments, read through the documentation and look at the tutorials I pointed you towards. This is really basic stuff. Failing that, you need to go for a training course:
http://www.mathworks.co.uk/services/training/courses/SLBE_1.html
Categorías
Más información sobre Spreadsheets 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!