MATLAB question involving matrices
古いコメントを表示
Write a MATLAB function that takes a matrix, a row number and a column number. Beginning with the row number passed to the function, scan down the column passed to the function and return the row number that contains the largest absolute value in the column. For example if your matrix is

and you pass row 2, column 2, the function should return 3. Row 3 has the largest absolute value in column 2 including and below row 2.
5 件のコメント
Star Strider
2014 年 11 月 20 日
What have you done to code it?
We will help you get your homework code working, but we will not write it for you.
B Ceng
2014 年 11 月 20 日
Star Strider
2014 年 11 月 20 日
It’s not confusing really. Start with Matrices and Arrays, then Matrix Indexing to understand it. (You may also need to read about Special Characters to understand how to do element-wise operations.)
Otherwise, search the MATLAB Documentation for the information you want, for instance ‘absolute value’ and ‘loop’ that you will need to do this particular problem.
Part of using any software is to understand how to use the documentation for it.
B Ceng
2014 年 11 月 20 日
Star Strider
2014 年 11 月 20 日
My pleasure!
I perhaps should have posted this as an answer, but it really isn’t one.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!