How to create new data from old data?

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

 Accepted Answer

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.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 24 Apr 2015

Commented:

on 24 Apr 2015

Community Treasure Hunt

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

Start Hunting!