Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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.

回答(1 个)

Ilham Hardy
Ilham Hardy 2015-2-11
save(a,'a')
But, why do you want to do this?
  1 个评论
Stephen23
Stephen23 2015-2-11
编辑:Stephen23 2015-2-11
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...

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by