How do i programmatically set parameter override sets to different test iterations for a single test case in MATLB?

조회 수: 8 (최근 30일)
For my test case, I have multiple test iterations that represent different "External Inputs." I want each test iteration to also have different "Parameter Sets." How do I dynammically assign parameter sets to specific test iterations programmatically through MATLAB.
My main goal is to have different parameter set per each test iteration. I want to save data and dynamically change the name after each test.
  댓글 수: 2
matthew cammuse
matthew cammuse 2020년 10월 9일
I also want to utilize parallel pooling to speed up modeling. How do I have N number of parallel pools running and save output data by means of a "To File" block with different file names?
Raymond Norris
Raymond Norris 2020년 10월 12일
Hi Matthew,
I don't support MATLAB Testing Frameworks, but I want to clarify your nomenclature, in case it helps a bit. There is only one parallel pool; however, you can have N number of workers running in that one parallel pool.
One caveat to parfor is that each of the workers sees themselves as equal identity (i.e. rank) because they don't talk to each other -- therefore they call think of themselves as rank==1. So if you want to write to a file, using the worker's rank won't help. But you could try using the workers pid, for example:
pid = feature('getpid');
filename = sprintf('results_%d',pid);
Again, I don't support Testing Frameworks so I don't know how you can fit this type of assignment into it, but programmatically, this might help.
Thanks,
Raymond

댓글을 달려면 로그인하십시오.

답변 (1개)

Jesús Zambrano
Jesús Zambrano 2021년 6월 30일
About overriding parameters programmatically, you could check the content described in this link:
Hope it helps.

카테고리

Help CenterFile Exchange에서 Results, Reporting, and Test File Management에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by