フィルターのクリア

matrix inverse, swap columns and rows

2 ビュー (過去 30 日間)
Thomas Kozinski
Thomas Kozinski 2021 年 3 月 12 日
回答済み: ANKUR KUMAR 2021 年 3 月 12 日
Hello, I have a matrix A as below and I have some problem with completing the steps below.
A = randi([-10,10],5,10)
I have to do:
1.swap the first line/row with the third one
2.swap the columns: second with fourth, sixth with eighth and the tenth with the first
3.using the empty matrix concept [] remove the fifth, sixth and tenth columns.
Thanks in advance!!!
  2 件のコメント
Steven Lord
Steven Lord 2021 年 3 月 12 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Adam Danz
Adam Danz 2021 年 3 月 12 日
編集済み: Adam Danz 2021 年 3 月 12 日

サインインしてコメントする。

採用された回答

ANKUR KUMAR
ANKUR KUMAR 2021 年 3 月 12 日
This looks like a homework problem. Here are some hints you can use it:
A = randi([-10,10],5,10)
%for swapping rows
A([1 2],:)=A([2 1],:);
% for swapping columns
A(:,[2,4])=A(:,[4,2]);
% removing columns
A(:,[5,6,10])=[];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by