adding constant offset to sensor
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mat CR
am 18 Nov. 2019
Bearbeitet: Mat CR
am 6 Dez. 2019
hello there
how can i add a constant offset to my sine wave( zero offset ), then be able to plot the sine wave i have added offset to on top of my original sine wave, i have atttched a picture of what i am talking about.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 18 Nov. 2019
Is this?
a=0.5 % amplitude
f=5 % frequency
t=linspace(0,10,500);
acc=-4*a.*pi^2./f.^2 .* sin(2*pi./f .* t);
plot(t,acc,'linewidth',2);
hold on;
off_set=3;
acc=acc+off_set;
plot(t,acc,'g','linewidth',2);
grid on;
legend('Without Offset', 'With Offset 3V')
2 Kommentare
KALYAN ACHARJYA
am 18 Nov. 2019
Bearbeitet: KALYAN ACHARJYA
am 18 Nov. 2019
I have answered based on original question. Hope the answer helped. Yes it can be, but it require longer time to debug your code.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!