matlab keep ignoring negative values when i plot the data....
what should i do to plot negative numbers...
Here is one of the example to plot the negative value, I used "axis" function.
tt = -0.00025:0.00001:0.00025;// setting the time axis y1 = 20*cos(2*pi*(2000)*(tt -37.2/10));//one of the function
tt = -0.00025:0.00001:0.00025;// setting the time axis
y2 = 14*cos(2*pi*(4000)*(tt +41.3/10));//
y3= y1+y2;//An operation on signal
subplot(3,1,1) plot(tt,y1) title('Y1') xlabel('Time') axis([min(tt) max(tt) ylim])
subplot(3,1,2) plot(tt,y2) title('Y2') xlabel('Time') axis([min(tt) max(tt) ylim])
subplot(3,1,3) plot(tt,y3) title('Y3') xlabel('Time') axis([min(tt) max(tt) ylim])
Get Answers For Free
Most questions answered within 1 hours.