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

8 visualizaciones (últimos 30 días)
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!

Respuesta aceptada

Abhishek Kumar Singh
Abhishek Kumar Singh el 22 de Jul. de 2024
Editada: Abhishek Kumar Singh el 22 de Jul. de 2024
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!

Más respuestas (0)

Categorías

Más información sobre Pattern Recognition and Classification en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by