Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I assign the same name to mat file as it is in another variable's input?

1 Ansicht (letzte 30 Tage)
Giorgi
Giorgi am 11 Feb. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hello all, well I have variable called a='b', now I want to save mat file, but the name of mat file should be equal to the input of a, so my new mat file's name should be b, Could you please help me.

Antworten (1)

Ilham Hardy
Ilham Hardy am 11 Feb. 2015
save(a,'a')
But, why do you want to do this?
  1 Kommentar
Stephen23
Stephen23 am 11 Feb. 2015
Bearbeitet: Stephen23 am 11 Feb. 2015
Agreed: why do this? The variable already has some name, so there does not seem to be any benefit to naming the whole .MAT file dynamically. It could make load-ing the .MAT file later more complicated too...

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by