Professional Documents
Culture Documents
11/17/22 9:28 PM MATLAB Command Window 1 of 2
11/17/22 9:28 PM MATLAB Command Window 1 of 2
>> l1=1:10
l1 =
1 2 3 4 5 6 7 8 9 10
>> l2=1:1:10
l2 =
1 2 3 4 5 6 7 8 9 10
>> l3=10:-1:1
l3 =
10 9 8 7 6 5 4 3 2 1
>> l4=1:0.3:pi
l4 =
>> l1(2)=l3(3)
l1 =
1 8 3 4 5 6 7 8 9 10
>> l4(3:5)=[1,2,3]
l4 =
>> l4(3:5)=[]
l4 =
>> l5=linspace(1,5,5)
l5 =
1 2 3 4 5
>> who
l1 l2 l3 l4 l5
>> whos
Name Size Bytes Class Attributes
l1 1x10 80 double
l2 1x10 80 double
l3 1x10 80 double
l4 1x5 40 double
l5 1x5 40 double
>> clear l1 l2 l3 l5
>> who
l4
>> clc