Lec02 Script M File Array
Lec02 Script M File Array
• You don’t want to type codes again and again. M-file (matlab code file).
• How to run
• Save and run button
• F5
• Type filename in the command window
Some useful functions …
4.2 BLOCK COMMENTS AND CODE CELLS
• Matlabrc.m
• You don’t need to change this file.
• It contains default features (window size, position, …)
• It runs pathdef.m that contains file paths.
• It runs startup.m.
• Startup.m
• Things that you want to run when you start Matlab.
>> x[3]
x[3]
↑
유효하지 않은 표현식입니다 . 함수를 호출하거나 변수를 인덱싱할 때는
소괄호를 사용하십시오 . 그렇지 않으면 , 일치하지 않는 구분 기호가 있는지
확인하십시오 .
• a = [3 5 7 9 11]
• b = [3 5 7 9 ……. 111]
Try ‘descend’
5. 10 Subarray searching
5.11 Array manipulation function
>> B = 1 : 12;
Repmat, kron, …
5.12 Array size
Number of element
No change
x=
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
• And, this
x=
0 5 9 13
2 0 10 14
3 7 0 15
4 8 12 0
Homework #01