Subtracting in matrix, column to column (Basic MatLab)?
古いコメントを表示
Given a 45×48 matrix, type a single command that subtracts column 36 from column 44
i answered this but it pops up as Error: Invalid use of operator. Is there something wrong or should it be in different type of form.
(:,36)-(:,44)
採用された回答
その他の回答 (1 件)
Image Analyst
2019 年 8 月 11 日
編集済み: Image Analyst
2019 年 8 月 11 日
You need to put the matrix name in there, and a result variables, like
result = m(:,44) - .....................
etc.
3 件のコメント
John wick
2019 年 8 月 11 日
Image Analyst
2019 年 8 月 11 日
Well you can't just have indexes within parentheses like (:,44), because how could MATLAB possibly know which matrix you're referring to.
John wick
2019 年 8 月 11 日
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!