필터 지우기
필터 지우기

Importing code from octave to matlab

조회 수: 7 (최근 30일)
Peter Cristian
Peter Cristian 2022년 4월 8일
댓글: Peter Cristian 2022년 4월 8일
Hello, i've got a problem with MatLAB when trying to run a code that i've written in octave.
The code in octave works perfectly but when i run it in MatLab it doesnt work, how can i write this line so it works in matlab?
The error message is: ` Invalid array indexing.`
z = abs(fft(c))(1:T*fs/2)/(T*fs);

채택된 답변

Stephen23
Stephen23 2022년 4월 8일
tmp = abs(fft(c));
z = tmp(1:T*fs/2)/(T*fs);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Octave에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by