Why does the matlab command window display everything?
조회 수: 17 (최근 30일)
이전 댓글 표시
Imanol Fernandez de arroyabe Zabala
2021년 12월 31일
댓글: Sulaymon Eshkabilov
2021년 12월 31일
For example, when I declare variables and when I'm changing them, for every iteration of this process, it shows the variable in the command window. How do I change this so that it only shows what I tell the program to show?
댓글 수: 0
채택된 답변
Sulaymon Eshkabilov
2021년 12월 31일
It can be attained quite easily using semicolon operator ";", e.g.:
% This displays all simulation reults
a = 3
for ii = 1:5
b(ii) = a*ii
end
%% This display what a user pinpoints:
a = 3;
for ii = 1:5
b(ii) = a*ii;
end
fprintf('b(%d) = %d \n', [ii, b(ii)])
% OR
fprintf('b(3) = %d \n', b(3))
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 AI for Wireless에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!