Azzera filtri
Azzera filtri

Load and plot .mat file

1 visualizzazione (ultimi 30 giorni)
Muhammad Mirza Murad
Muhammad Mirza Murad il 13 Gen 2022
Commentato: Voss il 14 Gen 2022
I need to load these files and plot them in frequency domain but currently this error keep appearing:
x = load('signal1.mat');
y = load('signal2.mat');
plot(x, y);
Error in q4 (line 3)
plot(x, y);
How to solve this problem?

Risposte (1)

Voss
Voss il 13 Gen 2022
x = load('signal1.mat')
x = struct with fields:
x: [0.0049 0.0044 0.0018 3.6715e-04 1.3332e-04 1.4758e-04 0.0013 0.0017 1.1187e-05 -6.7999e-04 -3.2793e-04 9.1101e-05 0.0027 0.0044 0.0031 0.0024 7.0672e-04 -0.0016 -4.1761e-04 5.5479e-04 -4.1560e-04 -4.5405e-04 -0.0017 -0.0033 -0.0017 2.5324e-04 … ]
y = load('signal2.mat')
y = struct with fields:
x: [0.0066 0.0027 0.0037 4.2831e-04 0.0021 0.0022 0.0028 0.0046 2.9883e-04 0.0011 -0.0023 5.7575e-04 -0.0017 0.0022 -1.9579e-06 -0.0017 -0.0023 -0.0039 -0.0011 -0.0026 0.0017 -0.0023 -0.0012 -0.0038 -0.0019 -0.0015 -1.1707e-04 0.0021 -0.0016 … ]
plot(x.x,y.x,'.')
  2 Commenti
Muhammad Mirza Murad
Muhammad Mirza Murad il 14 Gen 2022
Yeah nice but how do i plot it into frequency domain?
Voss
Voss il 14 Gen 2022
fft

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by