Matlab publish - sections inside loop

Hello everybody,
I want to create a report using the matlab publish option. the script reads some files from a directory and then uses for loop to analyze each file and show plots. My problem is that I want for each loop run to have it's section with updateing title like %% loop run i where i updates each time.
I searched for solution for few days and did not find any. the point of this is to create easy distinction of the different for runs.
I also saw something which called a report generator which seems more versatile but it seems that matlab now switched to "publish" and I wish to use updated commands.
Thanks

답변 (4개)

Sarah
Sarah 2013년 5월 2일

0 개 추천

Did you have a look at this post?
Rami
Rami 2013년 5월 2일

0 개 추천

Thanks for the answer. The post doesn't solve the problem since I want the loop runs plot to be seperated by Section title in the finial WORD file. for example code like
for i=1:m %% Run number 'i' plot... end
will resualt in Run 1 figures... ..
Run 2 Figures.. ..
and etc..
do you have solution?
per isakson
per isakson 2013년 5월 2일
편집: per isakson 2013년 5월 2일

0 개 추천

AFAIK: The string on the %%-row must be static. It cannot include the value of a string variable.
A dynamic title might be possible to create
  • write a function (with a loop), which automatically creates, writes and publish an m-file without the loop (and with static "%% titles") - kind of meta programming.
  • write directly to the Word-document. See wordreport. There are more similar contributions in the file exchange.
  • see "Accessing Microsoft Office Applications with .NET" in the on-line help
Sean de Wolski
Sean de Wolski 2013년 5월 2일

0 개 추천

This does sound like an ideal task for the MATLAB Report Generator which allows for this type of versatility.
An example of exactly what you want is the Magic Squares Report, available here:
If you are not currently licensed for this, I'm sure your friendly Sales Rep would be more than willing to get you a trial :)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

태그

질문:

2013년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by