clearvars
xData=[1,2,5,12,-3,3.4,pi,19,-12]
length(xData)
yData=[2,3,4,5,5,4,3,2,4];
length(yData);
xColumn = xData'
xRow = xColumn'
xData(3)
xData([2,4,7])
xSubset = xData(3:7)
xColumn(4:length(xColumn))
xSquare = power(xData,2)
xSquare = xData.^2
power(xData,3.4)
xData.^-2.3
list1 = [1,3,45,5,-4.3,-2];
list2 = [-3,3.33,4.1,-1.2,-0.85,1];
length(list1)
length(list2)
list1.*list2
list1./list2
dot(list1,list2)
cross([1,2,3],[4,5,6])
cross([4,5,6],[1,2,3])
linspace(1,954,23)
logspace(-2,2,12)
xData =
Columns 1 through 7
1.0000 2.0000 5.0000 12.0000 -3.0000 3.4000 3.1416
Columns 8 through 9
19.0000 -12.0000
ans =
9
xColumn =
1.0000
2.0000
5.0000
12.0000
-3.0000
3.4000
3.1416
19.0000
-12.0000
xRow =
Columns 1 through 7
1.0000 2.0000 5.0000 12.0000 -3.0000 3.4000 3.1416
Columns 8 through 9
19.0000 -12.0000
ans =
5
ans =
2.0000 12.0000 3.1416
xSubset =
5.0000 12.0000 -3.0000 3.4000 3.1416
ans =
12.0000
-3.0000
3.4000
3.1416
19.0000
-12.0000
xSquare =
Columns 1 through 7
1.0000 4.0000 25.0000 144.0000 9.0000 11.5600 9.8696
Columns 8 through 9
361.0000 144.0000
xSquare =
Columns 1 through 7
1.0000 4.0000 25.0000 144.0000 9.0000 11.5600 9.8696
Columns 8 through 9
361.0000 144.0000
ans =
1.0e+04 *
Columns 1 through 4
0.0001 + 0.0000i 0.0011 + 0.0000i 0.0238 + 0.0000i 0.4669 + 0.0000i
Columns 5 through 8
-0.0013 - 0.0040i 0.0064 + 0.0000i 0.0049 + 0.0000i 2.2272 + 0.0000i
Column 9
-0.1443 - 0.4440i
ans =
Columns 1 through 4
1.0000 + 0.0000i 0.2031 + 0.0000i 0.0247 + 0.0000i 0.0033 + 0.0000i
Columns 5 through 8
0.0470 - 0.0647i 0.0599 + 0.0000i 0.0719 + 0.0000i 0.0011 + 0.0000i
Column 9
0.0019 - 0.0027i
ans =
6
ans =
6
ans =
-3.0000 9.9900 184.5000 -6.0000 3.6550 -2.0000
ans =
-0.3333 0.9009 10.9756 -4.1667 5.0588 -2.0000
ans =
187.1450
ans =
-3 6 -3
ans =
3 -6 3
ans =
Columns 1 through 7
1.0000 44.3182 87.6364 130.9545 174.2727 217.5909 260.9091
Columns 8 through 14
304.2273 347.5455 390.8636 434.1818 477.5000 520.8182 564.1364
Columns 15 through 21
607.4545 650.7727 694.0909 737.4091 780.7273 824.0455 867.3636
Columns 22 through 23
910.6818 954.0000
ans =
Columns 1 through 7
0.0100 0.0231 0.0534 0.1233 0.2848 0.6579 1.5199
Columns 8 through 12
3.5112 8.1113 18.7382 43.2876 100.0000