How to save a filename that is part user input and part text?
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm having trouble figuring out how to save a filename that is part user input and part variable?
For example:
a = input('Please enter a filename: ', 's');
x = 1+1;
y = 2-0;
save(a??, 'x', '-ASCII');
save(a??, 'y', '-ASCII');
Let's say user filename is math
I want to save two different ascii files with a similar name as math, but be able to distinguish the two.
for example, I want to save them as:
mathadd
mathsub
How would I go about doing this with the save function? Is it even possible? Thanks.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!