for loop, write to text file, append, fprintf, pass input parameters

조회 수: 3 (최근 30일)
Lewis Doherty
Lewis Doherty 2020년 1월 29일
댓글: Lewis Doherty 2020년 1월 30일
Im looking to pass input parameters (Youngs Modulus) to a text file fprintf(fileID,'<E>%f<E/>\n',E_out);
The text file is running FEBio in terminal where im wanting it to run each of the individual values for E and present me with 3 different set of results.
Am i right in doing something like the following:
E_out = [100000 200000 30000]
for i = 1:length(E)
fprintf(fileID,'<E>%f<E/>\n',E_out(i));
end
And how would i get this to to then pass to my main file containg the FEBio textfile code.
  댓글 수: 5
Mohammad Sami
Mohammad Sami 2020년 1월 30일
It's not clear to me what FEBio text file code. Is it something outside Matlab ?
Lewis Doherty
Lewis Doherty 2020년 1월 30일
Yes. A finite element solver.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by