Put specific name in file via writematrix

30 visualizaciones (últimos 30 días)
Ivan Mich
Ivan Mich el 27 de Feb. de 2021
Editada: the cyclist el 27 de Feb. de 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?

Respuesta aceptada

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

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by