Simulink To workspace issues R2017a
Show older comments
In my simulink model (svpwm_inverter_rlc_A)
I have a 6 input mux block whose output connects to a "To workspace" block i named "currvolt".
When i run my code, (The relevant segment is shown below):
**************************************************
% Although 5 periods used, plot for 6 periods to show input turnoff transients
mysimstop = num2str(6/(1e3*f2usekhz));
% Run the simulink mode
sim('svpwm_inverter_rlc_A','StopTime', mysimstop)
%sim('svpwm_inverter_rlc_A')
t = currvolt.time;
currA = currvolt.signals.values(:,1); % 1st variable is 1st column of values
voltA = currvolt.signals.values(:,2); % 2nd variable is 2nd column of values
currB = currvolt.signals.values(:,3);
voltB = currvolt.signals.values(:,4);
currC = currvolt.signals.values(:,5);
voltC = currvolt.signals.values(:,6);
********************************************
I do not get the "currvolt" structure in the Matlab workspace.
However when i replace "sim('svpwm_inverter_rlc_A','StopTime', mysimstop)" with
" sim('svpwm_inverter_rlc_A')" ,
i get the "currvolt" output in the Matlab workspace
Are there other options i need to include in my Matlab configuration?
Thanks
David
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Environment Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!