Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

creating a for loop with a mixture of strings and numbers as outputs

조회 수: 3 (최근 30일)
Mostafa
Mostafa 2016년 3월 16일
댓글: Mostafa 2016년 3월 16일
I want to create a for loop that will have the following output:
"trial1.csv" on its first run, "trial2.csv" on its second run, "trial3.csv" on its third run......etc. What is the most efficient way of doing that?
trial1 = sprintf ('max%d', k) which gives me the trialk piece but I was not able to add the .csv piece. It gave me an error every time I tried adding it in different ways. I found a work around but needed 3 lines of code instead of 1. It works but doesn't seem to efficient.
I am still learning matlab so I am sure its a simple problem
Thanks in advance!
  댓글 수: 1
Mostafa
Mostafa 2016년 3월 16일
Why was my question deleted? I can accept that I did something wrong but at least tell me what I did?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by