How to graph a step response function and Arduino signal onto the same graph in MATLAB
2 次查看(过去 30 天)
显示 更早的评论
My project consists of taking a step response of an underdamped RLC circuit and comparing it to a step response of an experimental RLC circuit, using an arduino. I have the signal from my experiment and I figured out how to transfer my signal into the workspace in Matlab. But I am unable to graph both of the signals on one plot. My results are below.
This is my signal I received from my arduino setup above. Now I plot both the signals in Matlab but the signal from my arduino setup is plotting in the "simulation data inspector" while my step response is plotting on a different graph. I am not sure how to transfer either one of the data into a form that will allow me to graph both the data sets on the same graph. Does anyone have a solution to this?
0 个评论
回答(1 个)
Aditya Shah
2022-6-6
Hi!
After saving the signal in the Matlab workspace, you could use the "hold on" command for combining multiple plots in same axes.
Please refer to the following documentation for more information about combining multiple plots
https://www.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multicore Processor Targets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!