Put specific name in file via writematrix

6 Ansichten (letzte 30 Tage)
Ivan Mich
Ivan Mich am 27 Feb. 2021
Bearbeitet: the cyclist am 27 Feb. 2021
I want to create an output file. I would like my file to contains also one specific string (character) in its name.
My code is:
%A is a matrix (100x1 double)
str='2020'
writematrix(A,'output' str '.xlsx')
But command writematrix shows me error.
Could you please help me?

Akzeptierte Antwort

the cyclist
the cyclist am 27 Feb. 2021
Bearbeitet: the cyclist am 27 Feb. 2021
You need to concatenate the character arrays. Here is one way to do that:
str='2020'
writematrix(A,['output',str,'.xlsx'])

Weitere Antworten (0)

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by