Put specific name in file via writematrix

조회 수: 26 (최근 30일)
Ivan Mich
Ivan Mich 2021년 2월 27일
편집: the cyclist 2021년 2월 27일
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?

채택된 답변

the cyclist
the cyclist 2021년 2월 27일
편집: the cyclist 2021년 2월 27일
You need to concatenate the character arrays. Here is one way to do that:
str='2020'
writematrix(A,['output',str,'.xlsx'])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by