MATLAB: How to stem positive part of wave stem Hi everyone, I have a wave data, I need to show dispersion wave, so I need to "Stem" a "positive part" of the wave (look like the image below). Could you please to help me to solve it. Thank you in advance. Best Answer Try using following codeif true % codeendx1=rand(1,10);x2=rand(1,10);x=[x1 -x2];subplot(121);stem(x);title('+ve & -ve Data')for i=1:length(x) if sign(x(i))==-1 x(i)=0; endendsubplot(122);stem(x);title('+ve Data') Related SolutionsMATLAB: How to generate a “special” signal in Simulink In this example, the period is 10. MATLAB: How to detect P wave Download (or clone) BioSigKit. Load your ECG data into the data variable and change Fs to your sampling rate.Fs = 360;analysis = RunBioSigKit(data,Fs,0);analysis.MTEO_qrstAlg();figure;plot(data,'k');hold on;plot(analysis.Results.P,data(analysis.Results.P),'r*');xlim(size(data));title('P-wave detection using BioSigKit');set(gca,'fontsize',16);set(gcf,'color','w'); Related QuestionHow to plot an expression which contains integralBars showing the measurement periods for oceanography dataGenerating a 6 second sine waveMultiply a sawtooth wave form and sin wave togetherHow to find the gradient of a curve at a specific point
Best Answer