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?

回答(1 个)

Aditya Shah
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

类别

Help CenterFile Exchange 中查找有关 Multicore Processor Targets 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by