How do I select specific rows in a 1x15 matrix?
3 次查看(过去 30 天)
显示 更早的评论
If I havea 1x15 matrix, and I want to call elements 7,8,9 and 14, how would I go about putting it in the second line of code within parenthesis?
Soln = [AB; AI; BI; BC; CH; CI; CD; DE; EH; EG; EF; FG; DH; HI; GH]
Soln(???)
回答(1 个)
Cris LaPierre
2021-10-18
2 个评论
Cris LaPierre
2021-10-18
编辑:Cris LaPierre
2021-10-18
That is covered in Ch 5, but enclose all the numbers in square brackets.
A=1:10;
b=A([3:5 8])
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!