Save disp to a text file

조회 수: 9 (최근 30일)
Zayd Islam
Zayd Islam 2021년 3월 23일
답변: Fangjun Jiang 2021년 3월 23일
I want a text file with its name to be DailySummary and i want it to save these disp outputs in it. how should i do it?
disp(strcat('Day',{' '},num2str(data(i).elapsedtime(3)),{' '},' Healthy People = ',{' '},num2str(data(i).healthy)))
disp(strcat('Day',{' '},num2str(data(i).elapsedtime(3)),{' '},' Infected People = ',{' '},num2str(data(i).infected)))
disp(strcat('Day',{' '},num2str(data(i).elapsedtime(3)),{' '},' Sick People = ',{' '},num2str(data(i).sick)))
disp(strcat('Day',{' '},num2str(data(i).elapsedtime(3)),{' '},' Recovered People = ',{' '},num2str(data(i).recovered)))

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2021년 3월 23일
help diary

카테고리

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