Error using load: Number of columns on line 2 of ASCII file must be the same as previous lines.

조회 수: 15 (최근 30일)
Hello. I am trying to model a transceivers functionality and capability in MATLAB. I have recorded a signal and modulated the signal to 'send off' for fellow classmates to demodulate and discover. Of course, I am attempting to demodulate the signal first to make sure everything works. However, I am continuously running into the error code mentioned in the title when I try to load the "Modulated.wav" file. Can anyone please help me fix this issue?
% Demodulated Signal
clc
clear all;
Fc = 500; % Carrier Frequency in Hz
Fs = 12000; % Sampling Frequency in Samples/Sec
load Modulated.wav

채택된 답변

Steven Lord
Steven Lord 2020년 4월 5일
The load function is intended for use in loading a MAT-file or a regularly formatted text file. Use audioread to read in a sound file.
  댓글 수: 5
Steven Lord
Steven Lord 2020년 4월 6일
Okay, in that case the extension should probably be .mat or you should read it in using load with the -mat option to tell MATLAB that even though its extension is not .mat it is in fact a MAT-file.
Brian Gregory
Brian Gregory 2020년 4월 6일
Ah okay, I was trying to save it as a .wav file. It worked when I saved it as a .mat file. Thank you!

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by