how to create a job or write on a matlab file?
이전 댓글 표시
i have a job from another software and is unknown for me, the quantity of variables depends of 'a' defined by a user, i need to create every job on a matlab file.
a=1;
matlabbatch{1}.spm.stats.factorial_design.dir = '<UNDEFINED>';
matlabbatch{1}.spm.stats.factorial_design.des.t1.scans = ...
{'E:\archivos\proyecto de grado\cerebro\basic models\s3081-0003-00001-000001-01.nii,1'
'E:\archivos\proyecto de grado\cerebro\basic models\s3400-0003-00001-000001-01.nii,1'};
matlabbatch{1}.spm.stats.factorial_design.cov.c = [2
2
2];
matlabbatch{1}.spm.stats.factorial_design.cov.cname = 'covOneSample';
matlabbatch{1}.spm.stats.factorial_design.cov.iCFI = 1;
matlabbatch{1}.spm.stats.factorial_design.cov.iCC = 1;
but if users input is 2 i need to create a file.m that contains this:
matlabbatch{1}.spm.stats.factorial_design.dir = '<UNDEFINED>';
matlabbatch{1}.spm.stats.factorial_design.des.t1.scans = {
'E:\archivos\proyecto de grado\cerebro\basic models\s3081-0003-00001-000001-01.nii,1'
'E:\archivos\proyecto de grado\cerebro\basic models\s3400-0003-00001-000001-01.nii,1'
};
matlabbatch{1}.spm.stats.factorial_design.cov.c = [2
2
2];
matlabbatch{1}.spm.stats.factorial_design.cov.cname = 'covOneSample';
matlabbatch{1}.spm.stats.factorial_design.cov.iCFI = 1;
matlabbatch{1}.spm.stats.factorial_design.cov.iCC = 1;
matlabbatch{1}.spm.stats.factorial_design.dir = '<UNDEFINED>';
matlabbatch{1}.spm.stats.factorial_design.des.t1.scans = {
'E:\archivos\proyecto de grado\cerebro\basic models\s3081-0003-00001-000001-01.nii,1'
'E:\archivos\proyecto de grado\cerebro\basic models\s3400-0003-00001-000001-01.nii,1'
};
matlabbatch{1}.spm.stats.factorial_design.cov(2).c = [2
2
2];
matlabbatch{1}.spm.stats.factorial_design.cov(2).cname = 'covOneSample';
matlabbatch{1}.spm.stats.factorial_design.cov(2).iCFI = 1;
matlabbatch{1}.spm.stats.factorial_design.cov(2).iCC = 1;
댓글 수: 4
Geoff Hayes
2015년 1월 24일
Steven - can you describe what you mean by job?
steven Garcia
2015년 1월 25일
Geoff Hayes
2015년 1월 25일
Does this have to do with Simulink?
steven Garcia
2015년 1월 25일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!