Why can't this example of "Signal Source Separation Using W-Net Architecture" be opened in MATLAB?

조회 수: 7 (최근 30일)
When I try to run the example of "Signal Source Separation Using W-Net Architecture" on MATLAB, it showed an error:
"Error saving to local data stream." when communicating with websave (line 107) 5URL 'https://ssd.mathworks.com/supportfiles/SPT/data/fetal-ecg-source-separation-testData,zip'.
error matlab,internal.examples.downloadsupportFile(line 48)localfile =websave(localfile,webFilePath);".
The code block :"Download the train and test data sets using the downloadSupportFile function. The data will be unzipped to the tempdir directory. If you want the data at a different location, change trainingDatasetFolder and testDatasetFolder to the desired locations " can't run, and the detailed code is
if trainNetworkFlag
% Download training data set
trainingDatasetZipFile = matlab.internal.examples.downloadSupportFile('SPT','data/fetal-ecg-source-separation-trainingData.zip');
trainingDatasetFolder = fullfile(tempdir,'fetal-ecg-source-separation-trainingData');
if ~exist(trainingDatasetFolder,'dir')
unzip(trainingDatasetZipFile,trainingDatasetFolder);
end
end
% Download test data set
testDatasetZipFile = matlab.internal.examples.downloadSupportFile('SPT','data/fetal-ecg-source-separation-testData.zip');
testDatasetFolder = fullfile(tempdir,'fetal-ecg-source-separation-testData');
if ~exist(testDatasetFolder,'dir')
unzip(testDatasetZipFile,testDatasetFolder);
end
Thank you very much for your answers!Have a nice day!

채택된 답변

Abhishek Kumar Singh
Abhishek Kumar Singh 2024년 7월 22일
편집: Abhishek Kumar Singh 2024년 7월 22일
Hi @Yi Ma,
It seems that you're encountering an issue with downloading the dataset files using the matlab.internal.examples.downloadSupportFile function. This error might be due to a variety of reasons, including but bot limited to network issues.
If the automatic download is failing, you can manually download the files and place them in a folder of your choice (preferably anywhere except the temp directory, as writing permissions for MATLAB may have been disabled).
Here's the snippet you can use (replace tdir with a directory of your choice):
if trainNetworkFlag
% Manually download the training data set
trainingDatasetZipFile = fullfile(tdir, 'fetal-ecg-source-separation-trainingData.zip');
websave(trainingDatasetZipFile, 'https://ssd.mathworks.com/supportfiles/SPT/data/fetal-ecg-source-separation-trainingData.zip');
trainingDatasetFolder = fullfile(tdir, 'fetal-ecg-source-separation-trainingData');
if ~exist(trainingDatasetFolder, 'dir')
unzip(trainingDatasetZipFile, trainingDatasetFolder);
end
end
% Manually download the test data set
testDatasetZipFile = fullfile(tdir, 'fetal-ecg-source-separation-testData.zip');
websave(testDatasetZipFile, 'https://ssd.mathworks.com/supportfiles/SPT/data/fetal-ecg-source-separation-testData.zip');
testDatasetFolder = fullfile(tdir, 'fetal-ecg-source-separation-testData');
if ~exist(testDatasetFolder, 'dir')
unzip(testDatasetZipFile, testDatasetFolder);
end
As an ending note, please ensure you are using MATLAB release R2022b or later.
Hope it helps!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by