Creating vectors with components
이전 댓글 표시
How do I create a 5-element column vector whose components are the squares of the elements of vector Row
댓글 수: 2
David Hill
2019년 9월 21일
Look at transpose and basic matrix operations
Walter Roberson
2019년 9월 21일
What do you want to do if the vector Row is not exactly 5 elements long ?
답변 (1개)
Bruno Luong
2019년 9월 21일
r=[3 2 7 5 2]
r(1:min(5,end)).^2.'
or
r(1:min(5,end)).'.^2
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!