필터 지우기
필터 지우기

Load and plot .mat file

조회 수: 1 (최근 30일)
Muhammad Mirza Murad
Muhammad Mirza Murad 2022년 1월 13일
댓글: Voss 2022년 1월 14일
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?

답변 (1개)

Voss
Voss 2022년 1월 13일
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
Muhammad Mirza Murad
Muhammad Mirza Murad 2022년 1월 14일
Yeah nice but how do i plot it into frequency domain?
Voss
Voss 2022년 1월 14일
fft

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by