Print out a one column array
이전 댓글 표시
I have written the code below and it successfully prints out the average that I want PTS/G for all 20 values, however the matrix that is printed out has 19 extra columns of 0s. How do I delete those?
%average points per season
%ave = (PTS/G)
PTS =[539;1220;996;1485;1938;2019;2461;1557;1819;2832;2430;2323;2201;1970;2078;1616;2133;83;782;1161]
G = [71;79;50;66;68;80;82;65;66;80;77;82;82;73;82;58;78;6;35;66]
for ii=1:20
ave(ii)= PTS(ii)/G(ii)
disp(PTS(ii)/G(ii))
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Strategy & Logic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!