Cant transpose data in workspace to use it in a scope (Simulink)

4 views (last 30 days)
Dear Matlab Enthusiasts,
I have got a simple question. I tried to use some data from my workspace in Matlab. So i opened a model and inserted a from workspace block.Then i opened the from workspace block and inserted the name of the data (from the workspace) i wanted to use in Simulink. Eventually to see the verify the results i connected a scope to the from workspace block. The result wasn't what i had expected i got a scope with 801 lines (according to the values of the workspace).
My quest of problem solving started when i opened the scope and saw hey there are alot of colorfull lines. These lines are all the values from my workspace. So is there a command that i can get all these values into one line e.g. from 801 lines to a simple trend line by command? By the way i have noticed that my values from a certain parameter are all set in a horizontal row, perhaps thats why it shows me so many lines(801).
Is there a way to transpose it and get one trend line? Or is there a command that combines the horizontal values into one trend line?
With kind regards.

Answers (2)

Kaustubha Govind
Kaustubha Govind on 3 Aug 2012
You need to organize your data as described in the documentation for the From Workspace block. Note that you will need to provide time data along with signal data, so that Simulink knows which sample to pick at which time.

Wely Verhemel
Wely Verhemel on 3 Aug 2012
Edited: Wely Verhemel on 3 Aug 2012
Oke i transposed the data as a vertical row so the situation changed from (1 X 801 double) to (801 X 1 double). When i insert the newmade Value i get the error message that it requires a time value so im gonna add that value hoping it will clear that error. Thx for the answer

Products

Community Treasure Hunt

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

Start Hunting!