Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How I can i organize the array of matrix?

2 Ansichten (letzte 30 Tage)
Noa  Yelin
Noa Yelin am 20 Okt. 2020
Geschlossen: Rik am 20 Okt. 2020
Hey I wrote a function that the user enters a matrix, and the function returns "1" if the matrix is reversible(regular) and "0" if it's not.
I wrote this function-
function x=irr_mat(A)
n=size(A)
if isequal(A,zeros(n))
x=0;
else
if size(A,1)==size(A,2)
x=1;
else
x=0;
end
end
end
and i call the function -
A=randi([0,100],4);
irr_mat(A)
and get -
n =
4 4
ans =
1
I need to get matrix with 4X4... what is the problem?
  3 Kommentare
KSSV
KSSV am 20 Okt. 2020
What you entered is 4x4 matrix....so the answer 1, is correct. I am surprised what you are trying to achieve.
Rik
Rik am 20 Okt. 2020
This is at least the second follow up question. Do not post a new question about the same topic if you are not happy with the response you're getting. Ask for clarification instead.

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by