Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How to create matrix?

4 views (last 30 days)
Mansour Aljohani
Mansour Aljohani on 5 Aug 2015
Closed: Sabin on 25 Sep 2023
what is the code that can i create matrix n*m, where m is the pulse number and n is pulse length for a real data. Here is an example 3 pulses.The data I want is when the ‘lowSignal’ vector is equal to 1. I attached the data file and the matlab code.
load TX_DATA.mat
signal = TX(1:1400000);
subplot(3,1,1);
plot(signal);
grid on;
% MAIN CODE IS THE FOLLOWING TWO LINES OF CODE.
% Threshold the signal
lowSignal = abs(signal) < 0.04;
% Remove stretches less than 10,000 elements long.
% And invert it to get the high signal areas instead of the quiet areas.
lowSignal = ~bwareaopen(lowSignal, 10000);
% Now we're done. Plot the results.
subplot(3,1,2);
plot(lowSignal, 'b-', 'LineWidth', 2);
grid on;
% Plot both on the same graph now.
subplot(3,1,3);
plot(signal, '-', 'Color', [0,.5,0]);
hold on;
plot(lowSignal, 'b-', 'LineWidth', 2);
grid on;
  1 Comment
Abhishek Pandey
Abhishek Pandey on 7 Aug 2015
Hi Mansour,
Your question is not very clear. Could you please elaborate some more so that we know what you intend to do here. I believe an example with a smaller set of data would be very helpful.
- Abhishek

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!