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?

Réponses (1)

Voss
Voss le 13 Jan 2022

0 votes

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 commentaires

Muhammad Mirza Murad
Muhammad Mirza Murad le 14 Jan 2022
Yeah nice but how do i plot it into frequency domain?
Voss
Voss le 14 Jan 2022
fft

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by