Why parameter " yout " doesnt exist to workspace ?

Hi I try to sent one parameter from simulink to workspace the parameter i seek is variable from block yout in powergui i checked the mark from model configuration yout but doesnt show in workspace do you have any suggestion ??

 Accepted Answer

How are you starting the model running? If you are starting it from MATLAB using sim() then the variable would normally end up in the workspace of the function you ran sim() from.

10 Comments

could you explain more ? i just run my simulation from simulink and doesnt give me yout
"[...] Data is not available until the simulation is stopped or paused.
For menu-based simulation, data is written in the MATLAB® base workspace.
A sim command in a MATLAB function sends data logged with the To Workspace block to the workspace of the calling function, not to the MATLAB (base) workspace. To send the logged data to the base workspace, use an assignin command in the function."
So if you are running from the menus or by clicking on the diagrams, then your data should show up in the base workspace, once the model stops or is paused. Make sure you are examining the base workspace.
the variable i seek is creating from powergui named YOUT and problem is that each time i use to workspace it vanished during simulation what should i do ??
Can you post the .slx and the instructions for using it to recreate the problem?
and by the way the model is too slow and i assume that if i use the code on it would be slower than before , do you suggest any advise ? do you think there would be way to solve the problem and boost up the speed ??
You have the command in there
evalin('base','sim(''PrPUPFCSVM2'')');
so you are invoking sim(), rather than running from the menu.
However, DataGeneration.m appears to be a script rather than a function, so as long as you invoked it from the command line, it is going to be executing in the base workspace. Have a look at the very next line of code:
x =yout(1600:2799, :);
this tells you that Yes, yout is being retrieved from the workspace and is being used for further computation. It should still be there in the base workspace.
could you do the changes and send it back ?
i checked it , there is no yout in my base workspace , is it working for you ? did you fix it ? if yes just please send it back and by the way if you didnt realize yout is the parameter coming from block name yout , created after simulation done in powergui
I had another look. There does not appear to be a yout there. There is a Yout (capital Y) which is a subsystem (not a signal), with the subsystem having a Demux block that sends the individual elements to a whole bunch of different blocks.
If you are trying to get a copy of that signal before demuxing, you will need to add a tap off of the source of that subsystem, v,i and have a Save To Workspace block there. I do not find a To Workspace block there.
youre comment was so help full thank you

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!