Effacer les filtres
Effacer les filtres

How to saving data to file in different path in matlab?

1 vue (au cours des 30 derniers jours)
aniseija
aniseija le 1 Mai 2015
Modifié(e) : pfb le 1 Mai 2015
I am trying to save some data from current workspace in matlab to a different folder.The folder name is facedatabse. I tried using
saveFile='hafizah.dat';
save(saveFile,'gaborResult','-append','-v6')
where data is a cell array.it gives me error
Error using save
Unable to write file hafizah.dat: No such file or directory.
Error in face1 (line 138)
save(saveFile,'gaborResult','-append','-v6')
Anyone please help me!!

Réponses (1)

pfb
pfb le 1 Mai 2015
Modifié(e) : pfb le 1 Mai 2015
You are using "-append". That means that 'hafizah.dat' should already exist.
Does it exist?
According to matlab it does not.
You say you want to save in a different folder. However, you're saving in the current directory. Where is the path to the "different folder"?
The name of the saved file should include the whole path, e.g.
saveFile='../otherfolder/hafizah.dat';
(linux or mac path).

Catégories

En savoir plus sur Search Path dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by