You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Hva skrives ut hvis vi kjører scriptet «oppgave_3.m»?

oppgave_3.m
x = [ 'Hallo'; 'Baloo'; 'Jo   ' ];
y = { 'Hallo'; 'Baloo'; 'Jo' };
size(x)
size(y)
fprintf('Mitt navn er "%s".\n', x(3,:));
fprintf('Mitt navn er "%s".\n', y{3}); 

Videoforklaring (11:27)

Svar

ans =
     3     5
ans =
     3     1
Mitt navn er "Jo   ".
Mitt navn er "Jo".
  • No labels