In case it is helpful, here are all my Matlab videos in a single playlist ruclips.net/p/PLxdnSsBqCrrEU0dLSrTcl0-w9cVYKMTaF. You can support this channel via Patreon at www.patreon.com/christopherwlum or by clicking the 'THANKS' button underneath the video. Please let me know what you think in the comments. Thanks for watching!
for those who are using R2021b some tweaks are to be made as described below 11:42 you will see an extra variable (probably named ans) in your workspace once 'sim('PendulumModel.slx')' command is executed. 13:55 Now after that when you create an outport(yout) in simulink and run the code, you wont see any other variable getting added to your workspace. that is because the 'yout' variable will be created under the variable that was previously generated(probably named ans). Due to this you wont get the output you are expecting, to get the appropriate output just change code line, at 15:17 thetasignal = yout.getElement('theta'); to thetasingal = ans.yout.getElement('theta'); also to check the yout variable in command prompt , 14:05 type 'ans.yout'+enter 19:31 to get signal dimensions go to debug ------> information overlays ------->signals------->signal dimensions 23:58 'simX' & 30:38 'logsout' is similar variable to 'yout'. Change the code in similar way.
Thanks for the kind words. I've got several other videos on Matlab at ruclips.net/p/PLxdnSsBqCrrEU0dLSrTcl0-w9cVYKMTaF, please feel free to check them out. Thanks for watching!
AE501- The level of detail and why the methods are done each way is very helpful. Taking the viewer from novice to beginner quickly. More useful tools in the toolbox for Simulink! Thank you Chris!
You are the best teacher that I have ever found for Control Theory, I wish I knew you when I was taking my control systems course at university and yeah... you just got a new subscriber. ;)
Hi, Thanks for the kind words, I'm glad you enjoyed the video. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
AE501: This video had exactly what I needed to output data from Simulink. I also never knew you could run a Simulink model from a Matlab script! Knowing that in undergrad would've have helped a lot. Thanks again for a great Simulink reference.
Many thanks for your work! If I would find this tutorial earlier it would have saved me tons of time spent figuring things out myself. Still, this was extremely helpful, thanks to concise and clear way that you present information. Looking forward to learn more from your excellent tutorials.
Hi, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
I'm glad it was helpful. There are other similar videos on the channel please feel free to check them out and let me know what you think in the comments. Thanks for watching
Hi Gergely, Thanks for the kind words, I'm glad you enjoyed the video. I have a playlist dedicated to Matlab/Simulink on the channel. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
AE501: Very thorough tutorial. Provides instruction on multiple different ways to get data from Simulink to Matlab and vis-à-vis. I think I prefer your 45 minute videos to the 70+ minute videos, especially for foreign concepts.
Hi Sufi, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
@@ChristopherLum Thanks Chris. Sure I will consider that in a near future! Your work is good and it is worth it so I will do that but in a near future. Now, I am in the middle of something please.
I'm glad it was helpful. There are several related videos on the channel. Please feel free to check them out and I would love to hear what you think in the comments. Thanks for watching!
Hi, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
Hi Ashish, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
Although at 15:27 he shows you how to extract the time signal from the structure (which is nice to learn how to extract any signal from a structure), every simulation will always give you the time vector for the whole thing in the variable *tout* , which you don't need to define because the model will output it by default for you. That *t* that he defined is already *tout* if you wanted to use it. You can see in the variables section that they will both end having the same dimensions, a vector of 903 elements.
AE501: Great intro to getting matlab to talk to simulink. I was using R2020b and had some trouble getting "yout" to work correctly like your video. Had to go to model settings -> data import/export -> "uncheck" single simulation output and all worked perfectly. I guess mathworks must have modified that between 2016b and now.
Andrew, thanks for pointing this out, this is very helpful for users with R2020b. There were indeed some changes made between Matlab versions. As such, be careful in future demos and you may need to make small tweaks.
AA516: Thank you for this tutorial Professor! It might be a little bit confusing to some with the newer versions and how the data are structured slightly different but getting help from mathworks and directly clicking the data outputs to see what is stored in there will solve most of the issues. Thanks.
Hi Michele, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
Hi, Thanks for the kind words, I'm glad you enjoyed the video. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
I'm glad it was helpful. There are other similar videos on the channel please feel free to check them out and let me know what you think in the comments. Thanks for watching!
Hi Samer, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
I'm glad you enjoyed it. I've got several other videos in this series on the channel (and more coming in the very near future). Please let me know what you think of the other videos, thanks for watching!
I'm glad it was helpful. There are other Simulink videos on the channel. Please feel free to check them out. I'd love to hear from you in the comments on a future video. Thanks for watching!
Idk if its a quirk or I missed something in the video, but in order to access yout, I have to use out.yout as everything from the model is stored in an out parameter. Not sure why this is, and it seems like not many have this issue, but regardless, this is super helpful and will help me automate a ton of stuff. I'm working with motor models as a side project and running different parameters, voltages, etc and recording steady state/time delay etc and plotting, something that I knew could be done, but had no idea how to do it, seems very possible now. If i wanted to sweep 3-24V, record the steady state to an array, and plot the array, I could very easily do this, even juggling multiple models (comparing simulink parameters and simscape physical sims). This will save me a ton of time, thank you
Hi Joe, You are correct, this is one of the new additions/changes that Simulink implemented recently. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. I can also answer questions via Patreon. Thanks for watching! -Chris
AE501. Great Video. I had actually never really used Simulink and I was thinking whether this was possible during the last video. I think you did a great job describing how to utilize it. Thanks for the vid!
Hi JX, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
Hi Eric, Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching! -Chris
In case it is helpful, here are all my Matlab videos in a single playlist ruclips.net/p/PLxdnSsBqCrrEU0dLSrTcl0-w9cVYKMTaF. You can support this channel via Patreon at www.patreon.com/christopherwlum or by clicking the 'THANKS' button underneath the video. Please let me know what you think in the comments. Thanks for watching!
Thank you.
Also, where can i dowbload your script ?
for those who are using R2021b some tweaks are to be made as described below
11:42 you will see an extra variable (probably named ans) in your workspace once 'sim('PendulumModel.slx')' command is executed.
13:55 Now after that when you create an outport(yout) in simulink and run the code, you wont see any other variable getting added to your workspace.
that is because the 'yout' variable will be created under the variable that was previously generated(probably named ans).
Due to this you wont get the output you are expecting, to get the appropriate output just change code line, at
15:17 thetasignal = yout.getElement('theta'); to thetasingal = ans.yout.getElement('theta');
also to check the yout variable in command prompt ,
14:05 type 'ans.yout'+enter
19:31 to get signal dimensions
go to debug ------> information overlays ------->signals------->signal dimensions
23:58 'simX' & 30:38 'logsout' is similar variable to 'yout'. Change the code in similar way.
Love you
thank you
Your tutorials are long, but the clarity after watching them is amazing. Thank you for putting these efforts for us.
I'm glad it was helpful, thanks for watching!
The most helpful Matlab&Simulink instruction I have even seen. Thanks a lot!
I was lost until I found you. Thank you very much for the great content.
I'm glad it was helpful. I have other videos that you might be in interested in regarding Matlab and Simulink. Thanks for watching!
AE 501: I really appreciate seeing the derivation and the transfer into Simulink. Your effort for clarity in these video do not go unnoticed!
Thanks! I'm glad you found the video helpful.
Thanks × 100. There aren't great video tutorials for beginners in Matlab/Simulink. Greetings from Venezuela.
Your tutorials are far better than the stuff from Mathworks. Thank your very much!
Thanks for the kind words. I've got several other videos on Matlab at ruclips.net/p/PLxdnSsBqCrrEU0dLSrTcl0-w9cVYKMTaF, please feel free to check them out. Thanks for watching!
AE501- The level of detail and why the methods are done each way is very helpful. Taking the viewer from novice to beginner quickly. More useful tools in the toolbox for Simulink! Thank you Chris!
You are the best teacher that I have ever found for Control Theory, I wish I knew you when I was taking my control systems course at university and yeah... you just got a new subscriber. ;)
I'm glad it was helpful. There are other similar videos on the channel, please feel free to check them out. Thanks for watching!
@@ChristopherLum sure
Christopher Lum, You are a really good instructor. You should make more tutorials!! Maybe more beginners, intermediate, expert
Learned Simulink a while ago, glad there's a thorough video to help explain again different features.
Scripting being the superior interface to GUI-based systems, this is a helpful resource.
AMAZING VIDEO. Everything is so clear, no confusion whatsoever. Thank you so much.
Hi,
Thanks for the kind words, I'm glad you enjoyed the video. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
i cant thank you enough. I was stucked at a problem for so long. Your video has helped me solve it.
AE501: This video had exactly what I needed to output data from Simulink. I also never knew you could run a Simulink model from a Matlab script! Knowing that in undergrad would've have helped a lot. Thanks again for a great Simulink reference.
Aimee, I'm glad it was helpful. Were you able to get the data from the 'To Workspace' block using the new syntax we discussed?
@@ChristopherLum I was! I tried out both the "out1" block and the "to workspace" block.
Being able to have Matlab and Simulink talk to each other is a big advantage. Thanks
Many thanks for your work! If I would find this tutorial earlier it would have saved me tons of time spent figuring things out myself. Still, this was extremely helpful, thanks to concise and clear way that you present information. Looking forward to learn more from your excellent tutorials.
Hi,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Great video on showing how to return and use information from a Simulink model
the best recommended for study exchange data from Simulink and Matlab Script ever !!!!!!
This is a pretty neat way to take Simulink and data analysis to the next level of complexity
I have been searching for this for the last 4hrs. Thanks a lot God
Amazing lecture. Detailed and well put together. Thank you!
I'm glad it was helpful. There are other similar videos on the channel please feel free to check them out and let me know what you think in the comments. Thanks for watching
Very helpful video. Gave me a much better understanding of using MATLAB to interact with a Simulink model
Thank you. I have nothing else to describe how thankful i am 🥺
One of the best and most useful tutorial. Straightforward but full of details and information at the same time! Huge thanks for it! WANT MORE! :D
Hi Gergely,
Thanks for the kind words, I'm glad you enjoyed the video. I have a playlist dedicated to Matlab/Simulink on the channel. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
This video clears up a lot about interfacing MatLAB and Simulink.
AE501: Very helpful explanation of using MATLAB script with Simulink!
AE501: Very thorough tutorial. Provides instruction on multiple different ways to get data from Simulink to Matlab and vis-à-vis. I think I prefer your 45 minute videos to the 70+ minute videos, especially for foreign concepts.
AE 501: This was super helpful for the homework! It made it super easy to export the scope graphs
One of the very useful that is worth watching and you will learn something from it.
Hi Sufi,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
@@ChristopherLum Thanks Chris. Sure I will consider that in a near future! Your work is good and it is worth it so I will do that but in a near future. Now, I am in the middle of something please.
AA 516: This video made a previously daunting task really easy to understand and follow, I'm excited to learn more about Simulink modeling!
You really deserve much more likes!!!!!!!
I'm glad it was helpful. There are several related videos on the channel. Please feel free to check them out and I would love to hear what you think in the comments. Thanks for watching!
My very basic to complex doubts ...all are sorted thanku for such great video.....
Hi,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Thanks! It's really great to see the depth of Simulink/Matlab package
Is incredible how bad documented Matlab is, thanks Christopher, you are a life saver.
Excellent pedagogy. Thankyou Prof. Lum
Hi Ashish,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Learned a lot; I did most of this stuff manually, but these steps can help save a lot of time
Thank you professor for your help .l am student from ethiopia ,tigray
very good turorial, easy to understand. Thank you!
Thanks for watching!
Sir,superb description and the way you presented is simply excellent....Expect more from you sir
Although at 15:27 he shows you how to extract the time signal from the structure (which is nice to learn how to extract any signal from a structure), every simulation will always give you the time vector for the whole thing in the variable *tout* , which you don't need to define because the model will output it by default for you. That *t* that he defined is already *tout* if you wanted to use it. You can see in the variables section that they will both end having the same dimensions, a vector of 903 elements.
thank you very much!, this is very informative and helpfull! I'm an engeneering studant and your channel is like a tresure for me.
AE501: Great intro to getting matlab to talk to simulink. I was using R2020b and had some trouble getting "yout" to work correctly like your video. Had to go to model settings -> data import/export -> "uncheck" single simulation output and all worked perfectly. I guess mathworks must have modified that between 2016b and now.
Andrew, thanks for pointing this out, this is very helpful for users with R2020b. There were indeed some changes made between Matlab versions. As such, be careful in future demos and you may need to make small tweaks.
Just saved me after 45 minutes of trial and error. Thanks!
Thank you! I was struggling from the same issue.
I keep getting this error "Dot indexing is not supported for variables of this type" .
Had a bit of trouble defining a function on Simulink recently. This gives me hope!! Thank you for the great content.
Great Video!! Very good explanaitions, very good speed an great examples!!
Your explanation is so good! Thanks.
AA516: Thank you for this tutorial Professor! It might be a little bit confusing to some with the newer versions and how the data are structured slightly different but getting help from mathworks and directly clicking the data outputs to see what is stored in there will solve most of the issues. Thanks.
I'm glad you are able to reconcile the differences. This is a powerful mechanism and we'll use this a lot in the future.
A lot of powerful tools/commands! Thank you for the tutorial, Dr. Lum.
AE 501: I really enjoyed learning about the more advanced features of simulink 🙂
AA 516 : Great video, really helped me to get started on HW 3.
great reference for a cleaner/faster way of using simulink thanks
Another great video! Starting to understand the true ability that Simulink has!
Video is really helpful. Lots of good quality of life information.
Thank you for this clear and helpful tutorial
Hi Michele,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Great resource for learning how to extract simulation data for analysis!
This was an incredible video! Thank you so much this helped me with my final project.
Hi,
Thanks for the kind words, I'm glad you enjoyed the video. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Simulink seems to be a super powerful tool!
Great tutorial! Thank you for the nice demonstrations.
I'm glad it was helpful. There are other similar videos on the channel please feel free to check them out and let me know what you think in the comments. Thanks for watching!
Thanks for the great video. This was very helpful and well laid out!
AE 512: good refresher on Simulink!
It's such an amazing job❤
My gratitude and appreciation for you🙏🙏
Hi Samer,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
This video was so helpful I liked *and* commented on it. I don't do that often.
A really great and useful tutorial. Thanks.
Thanks for watching
Nice video! Thanks for telling us the different ways to grab outputs from our Simulink model
Great videos Christopher.. Thanks for your efforts for putting this
Thanks Sir, greetings from Brazil.
Man, you are Incredible!!!
I'm glad you enjoyed it. I've got several other videos in this series on the channel (and more coming in the very near future). Please let me know what you think of the other videos, thanks for watching!
I like how you can create your own torque function and model it in simulink.
Sir its just really really helpful...... 🌹🌹🌹
I'm glad it was helpful. There are other Simulink videos on the channel. Please feel free to check them out. I'd love to hear from you in the comments on a future video. Thanks for watching!
Thank you for your kind help. It saves more time.
good overview how to use simulink data in matlab. The graphs in matlab definitely look nicer than the scope charts.
This was very helpful for learning more about Simulink!
Idk if its a quirk or I missed something in the video, but in order to access yout, I have to use out.yout as everything from the model is stored in an out parameter. Not sure why this is, and it seems like not many have this issue, but regardless, this is super helpful and will help me automate a ton of stuff. I'm working with motor models as a side project and running different parameters, voltages, etc and recording steady state/time delay etc and plotting, something that I knew could be done, but had no idea how to do it, seems very possible now. If i wanted to sweep 3-24V, record the steady state to an array, and plot the array, I could very easily do this, even juggling multiple models (comparing simulink parameters and simscape physical sims). This will save me a ton of time, thank you
Hi Joe,
You are correct, this is one of the new additions/changes that Simulink implemented recently. If the find the these videos to be helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. I can also answer questions via Patreon. Thanks for watching!
-Chris
this what i was searching for so long thanks a lot
Great tutorial. Very helpful. Thanks.
A very helpful video. Thank you for posting this.
This is brilliant, thank you very very much.
AE501. Great Video. I had actually never really used Simulink and I was thinking whether this was possible during the last video. I think you did a great job describing how to utilize it. Thanks for the vid!
AE501: Great explanation!
it's super clear and supportive. Thanks!
Hi JX,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
This is excellent. Well done
I'm glad it was helpful, thanks for watching!
This is great video
You're awesome
Keep up the great work and I wish you all the best in your life
Ae501: Thanks for a full example of the dynamic system. As for the instructions, very thorough but it is very long.
It can be a bit overwhelming at first but we'll go through it together step by step!
Wow! This is great. Thank you so much.
I'm glad it was helpful thanks for watching!
Thanks for the detailed tutorials on these utilities!
Excellent tutorial, thanks
This is brilliant, thank you.
Very in-depth.
Great Tutorial Easy to Watch thank you
Thanks a lot! Great introduction!
Thanks for watching!
This section helped in our homeworks
Thanks
Sam
Awesome tutorial! Really thank you!
Hi Eric,
Thanks for the kind words, I'm glad you enjoyed the video. If you find these videos helpful, I hope you'll consider supporting the channel via Patreon at www.patreon.com/christopherwlum or via the 'Thanks' button underneath the video. Given your interest in this topic, I'd love to have you a as a Patron as I'm able to talk/interact personally with all Patrons. Thanks for watching!
-Chris
Cleaner method in defining inputs/outputs. Much more comfortable reading data on a matlab script than a Simulink model at the moment.
Awesome explanations, thank you so much!
Very useful information.
Amazing tutorial. Thanks a lot!
God bless you again bro!
Very informational, thanks for the tutorial!
Great Tutorial! Very thank you Sir.
Totally great tutorial.