Hello Ash B, In MATLAB with R2020b, there is some modification in "to workspace block". You have used variable "simout" and it is storing it in "out.simout". You are required to extract it by command "simout = (out.simout)". Now you can access this variable to do necessary operation.
@@info4eee I was trying to recreate this :ua-cam.com/video/t4XFJkQhMkc/v-deo.html&ab_channel=rkarthikkumarACADEMY After that command it says in orange: Warning: Unrecognized field name "simout". > In Simulink/SimulationOutput/get In Simulink/SimulationOutput/subsref
The reason for problem with plot(t,I) will be the variable t and I. The data in these variable should be in array form for proper working so please select array in workspace block. I hope it will solve your problem. If still it is there then please share the screenshot of your simulink model on info4eee@gmail.com to get more clarity about your problem.
Hello Chomnan Saedan, I think you are using the new version of MATLAB. In new version of MATLAB two additional commands are required to extract simulation data. PS : There are updates in "to workspace block" in latest version of MATLAB. For example: If you are using two "to workspace block" with variable "time" and "amplitude" then it will be stored in single "out" variable. You need to perform additional step to extract it by following command : "time = (out.time)" and "amplitude = (out.amplitude)"
@@info4eee Hi, in my case i cannot see the 'out' as well. its like none is transferred from the simulink. In my design i have two simulink models and one simulink model works well where it transferrers a definite value which is 51*1 dataset. But in the second simulink model i tries to transfer mean value of a constant signal. that variable cannot be seen in workspace. please help
Hello @@dilshangunatillake5336, If one Simulink model is transferring data then another Simulink model should also transfer data. In my opinion, there should sampling time mismatching.
@@LuqmanKhan-kv6xs, You can send the any variable {speed (w)} to the workspace with "to workspace block" from each four simulation model. Let four speed variable are w_1, w_2, w_3, and w_4. Along with that you can also send the simulation time to workspace with clock block. Now You can plot all four variable with respect to time using plot command (ua-cam.com/video/JTSWxm3Y3fk/v-deo.html).
There may be mismatching of sampling time with different blocks. If still problem remains then you can share screen shot of the problem through email on "info4eee@gmail.com". We will try to resolve your query.
Hello Mr. Viktor W, please follow the steps given below to save the simulation results with different input parameters in MATLAB Simulink. Suppose we want the simulation results of variable O at 100, 200, 300, and 400 amplitude as discussed in this video. 1. Set the amplitude of sine wave block *100* . Run the simulation and transfer the data of O in to variable *O1* by using command *"O1=O;"* on command window. 2. Set the amplitude of sine wave block *200* . Run the simulation and transfer the data of O in to variable *O2* by using command *"O2=O;"* on command window. 3. Set the amplitude of sine wave block *300* . Run the simulation and transfer the data of O in to variable *O3* by using command *"O3=O;"* on command window. 4. Set the amplitude of sine wave block *400* . Run the simulation and transfer the data of O in to variable *O4* by using command *"O2=O;"* on command window. 5. On command window, use the command *"hold"* to held the current plot. 6. On command window, use the command "plot(t,O1);" to plot first simulation result. 7. On command window, use the command "plot(t,O2);" to plot second simulation result. 8. On command window, use the command "plot(t,O3);" to plot third simulation result. 9. On command window, use the command "plot(t,O4);" to plot fourth simulation result. In this way, you can save the simulation results with different input parameters in MATLAB Simulink. You can also insert the legend to differentiate different results.
Suppose you want to measure the THD in Voltage waveform then just go through following steps. 1) Open respective scope block -> Configuration Properties -> Logging -> Check-in Log data to workspace -> Save format as dataset. 2) Open powergui block -> Tools -> FFT Analysis -> Check available signals and select appropriate signal. 3) After selecting number of cycles and fundamental frequency, click on display the frequency of respective signal i.e. Voltage.
@@info4eee so I'm using from workspace block in simulink and I want to import Heartrate Signal, that I got from reading a CSV file. The written error is, I forgot about the detail, about my data don't have root input or something like that, and I'm trying to use "mapper input" that come from connect input but my signal is not detected. My data is a 2-D matrix with with 1st column is Timestamp and 2nd column is the signal value Thanks in advance and your respondf...
My outputs are "Out.simout" for example instead of just "simout"? is there a fix?
Yes Ash B, "Out.simout" in not a valid variable in name in MATLAB. You can use "Out_simout" instead.
@@info4eee is that another variable in simulink?
@@FALLEN1ASH You can assign any name as per your need in simout block.
Hello Ash B,
In MATLAB with R2020b, there is some modification in "to workspace block". You have used variable "simout" and it is storing it in "out.simout". You are required to extract it by command "simout = (out.simout)". Now you can access this variable to do necessary operation.
@@info4eee I was trying to recreate this :ua-cam.com/video/t4XFJkQhMkc/v-deo.html&ab_channel=rkarthikkumarACADEMY
After that command it says in orange:
Warning: Unrecognized field name "simout".
> In Simulink/SimulationOutput/get
In Simulink/SimulationOutput/subsref
Thank you
Thanks for watching 😊
Superb
Thanks a lot *Lata Di* for your kind feedback.
Thank You *Mrs. Lata Thakur* for your appreciating words. It means us a lot.
@@PSJamwal jeeju keep it up
ich küss dein auge brudi.
thank you bro
Thanks a lot *Shibalnu* for your lovely words. It means us a lot and fill us with energy.
Thank you bro
Thank You Yahia Bousseloub!!!
Thank you sir
Thank You *Mr. Manohar Manu* for your feedback. It means us a lot.
Pls, i have problem or not? I can't write plot(t,I). In workspace has no data and only (out). Help me pls sir
The reason for problem with plot(t,I) will be the variable t and I. The data in these variable should be in array form for proper working so please select array in workspace block. I hope it will solve your problem. If still it is there then please share the screenshot of your simulink model on info4eee@gmail.com to get more clarity about your problem.
plot(out.t, out.I)...
I dont think my matlab and simulilnk are "linked" because I run and no variables show up
Hello Chomnan Saedan, I think you are using the new version of MATLAB. In new version of MATLAB two additional commands are required to extract simulation data.
PS : There are updates in "to workspace block" in latest version of MATLAB. For example: If you are using two "to workspace block" with variable "time" and "amplitude" then it will be stored in single "out" variable. You need to perform additional step to extract it by following command :
"time = (out.time)" and "amplitude = (out.amplitude)"
@@info4eee Hi, in my case i cannot see the 'out' as well. its like none is transferred from the simulink. In my design i have two simulink models and one simulink model works well where it transferrers a definite value which is 51*1 dataset. But in the second simulink model i tries to transfer mean value of a constant signal. that variable cannot be seen in workspace. please help
I'm using matlab R 2016a. transferring using scope also didn't work
Hello @@dilshangunatillake5336, If one Simulink model is transferring data then another Simulink model should also transfer data. In my opinion, there should sampling time mismatching.
What is the use of solverblock
Which solver block you are talking about.
Please help, my simulation timing is 2 but when I am using simout transferring data timing becomes 4 means always double why?
There is option of decimation in to workspace block, Set this parameter as 1.
How to obtain comparative results of different simulink models
Can you elaborate your query in more details? Means what are you expecting.
@@info4eee I have designed 4 simulink models (controllers) and want to obtain comparative results of 4 models in one scope of each variables
@@LuqmanKhan-kv6xs, You can send the any variable {speed (w)} to the workspace with "to workspace block" from each four simulation model. Let four speed variable are w_1, w_2, w_3, and w_4. Along with that you can also send the simulation time to workspace with clock block. Now You can plot all four variable with respect to time using plot command (ua-cam.com/video/JTSWxm3Y3fk/v-deo.html).
Sir i have problem like 7 level output with this simout I'm getting only 0 to peak output not getting like steps wise of 7 levels
There may be mismatching of sampling time with different blocks. If still problem remains then you can share screen shot of the problem through email on "info4eee@gmail.com". We will try to resolve your query.
how can i save this information for variable runs of the simulation with different input parameters to be able to compare the results?
Hello Mr. Viktor W, please follow the steps given below to save the simulation results with different input parameters in MATLAB Simulink. Suppose we want the simulation results of variable O at 100, 200, 300, and 400 amplitude as discussed in this video.
1. Set the amplitude of sine wave block *100* . Run the simulation and transfer the data of O in to variable *O1* by using command *"O1=O;"* on command window.
2. Set the amplitude of sine wave block *200* . Run the simulation and transfer the data of O in to variable *O2* by using command *"O2=O;"* on command window.
3. Set the amplitude of sine wave block *300* . Run the simulation and transfer the data of O in to variable *O3* by using command *"O3=O;"* on command window.
4. Set the amplitude of sine wave block *400* . Run the simulation and transfer the data of O in to variable *O4* by using command *"O2=O;"* on command window.
5. On command window, use the command *"hold"* to held the current plot.
6. On command window, use the command "plot(t,O1);" to plot first simulation result.
7. On command window, use the command "plot(t,O2);" to plot second simulation result.
8. On command window, use the command "plot(t,O3);" to plot third simulation result.
9. On command window, use the command "plot(t,O4);" to plot fourth simulation result.
In this way, you can save the simulation results with different input parameters in MATLAB Simulink. You can also insert the legend to differentiate different results.
How can I measure thd? Pls reply
Suppose you want to measure the THD in Voltage waveform then just go through following steps.
1) Open respective scope block -> Configuration Properties -> Logging -> Check-in Log data to workspace -> Save format as dataset.
2) Open powergui block -> Tools -> FFT Analysis -> Check available signals and select appropriate signal.
3) After selecting number of cycles and fundamental frequency, click on display the frequency of respective signal i.e. Voltage.
@@info4eee I know that. But I need to the code for that. In command window..
@@Adeebpsy1999 Then you can use THD measurement block to export to workspace.
@@info4eee I need program code using workspace
Please explain your requirement in details so that we respond accordingly.
how about from workspace into simulink, cause I have a problem with it
No, there is no problem, You can call the data available in workspace to Simulink!!!
@@info4eee so I'm using from workspace block in simulink and I want to import Heartrate Signal, that I got from reading a CSV file.
The written error is, I forgot about the detail, about my data don't have root input or something like that, and I'm trying to use "mapper input" that come from connect input but my signal is not detected.
My data is a 2-D matrix with with 1st column is Timestamp and 2nd column is the signal value
Thanks in advance and your respondf...
the timestamp is showed up in mapping input window but the value of the timestamp does not showed up
@@DewanggaPrabowo Can you share the screenshot of the simulation with error? You can drop it on info4eee@gmail.com
Hello, my problem is that I only get 51 value, thanks
Hello Aghiles Moussaoui, It may be because of sampling time mismatching. For more clarity please share screen shot of your simulation.