Why does the matlab command window display everything?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Imanol Fernandez de arroyabe Zabala
am 31 Dez. 2021
Kommentiert: Sulaymon Eshkabilov
am 31 Dez. 2021
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 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 31 Dez. 2021
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu AI for Wireless finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!