Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagenone
titleoppgave_2.m
x = [ '0':'9', 'A':'Z', 'a':'z' ]
fprintf('%3c ', x);
fprintf('\n');
fprintf('%3d ', x);
fprintf('\n');
length('a':'å')
double(['æ', 'ø', 'å']) 

Videoforklaring (

...

16:

...

16)

Del 1 (mm8:ss28)Del 2 (mm3:ss25)Del 3 (mm4:ss23)
Widget Connector
urlhttps://www.youtube.com/watch?v=NRxUjzt2OtQ
Widget Connector
urlhttps://www.youtube.com/watch?v=Lk5UbMytKiQ
Widget Connector
urlhttps://www.youtube.com/watch?v=cyRONfvIZyc
 

Generelt om bokstaver som tall, og bruk av
kolon-operasjonen med bokstaver.

Fprintf med bokstavverdier tolket som tall. Bruk av norske bokstaver, og oppgaveoppsummering.

Svar

Expand
titleHvis du har prøvd selv, trykk her for å se svaret...
Code Block
x =
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z   a   b   c   d   e   f   g   h   i   j   k   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z 
 48  49  50  51  52  53  54  55  56  57  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 
ans =
   133
ans =
   230   248   229