I want to create new data and combine data which has same Alpha with high peak
OldData= [ 0.5 0.6 -0.1 0.2 0.5; ...
0.2 0.3 0.1 0.7 0.6; ...
0.7 0.6 -0.2 0.3 0.4];
OldData =
0.5000 0.6000 -0.1000 0.2000 0.5000 %%%%OldData(1,:) have Alpha=0.6
0.2000 0.3000 0.1000 0.7000 0.6000 %%%%OldData(2,:) have Alpha=0.2
0.7000 0.6000 -0.2000 0.3000 0.4000 %%%%OldData(3,:) have Alpha=0.7
If I assume that OldData(1,:) is one signal, and OldData(2,:) and OldData(3,:) are other signals. How can I combine signal which have alphas more than 0.5, which have the higher peak?
for i=1:3
figure;
OldData(i,:)
if Alpha>0.5
NewData(i,:)=OldData(i,:);
else
NewData(i,:)=0;
end
end
How I combine signal?
Thank you

 Akzeptierte Antwort

Image Analyst
Image Analyst am 24 Apr. 2015

0 Stimmen

Try this:
NewData = zeros(size(OldData));
for k=1:3
figure;
OldData(k,:) % Echo to command window.
if Alpha(k) > 0.5 % Check Alpha for this signal.
NewData(k,:)=OldData(k,:);
end
plot(NewData, 'b*-', 'LineWidth', 2, 'MarkerSize', 12);
end
Of course you must have your Alphas in an array.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 24 Apr. 2015

Kommentiert:

am 24 Apr. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by