Filter löschen
Filter löschen

error when im trying to save

18 Ansichten (letzte 30 Tage)
UPT
UPT am 3 Jun. 2012
Hi all.im trying to make a load short forecasting but in one of the steps i cant go on because of this error: *??? Error using ==> save Unable to write file Data\testSet: No such file or directory.*..could you help me?thanks
  5 Kommentare
Image Analyst
Image Analyst am 3 Jun. 2012
Your code would be more robust if you had a special folder for your data files and didn't mix your data files in with your m-files, fig files, and other files. Learn how to use uigetdir(), uigetfile(), fullfile(), exist(), and mkdir().
UPT
UPT am 3 Jun. 2012
thanks for your help,especially you walter roberson..

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Thomas
Thomas am 3 Jun. 2012
try
save('testSet.mat','testDates', 'testX' , 'testY') %to save it in the current directory
or create a directory called Data and use
save('Data\testSet.mat','testDates', 'testX' , 'testY') % to save in Data dir
or just add the follwing in a line above the save command
mkdir('Data'); % this should create the data directory

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by