Representation of matrix in term of sets
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
rohini more
el 22 de Mzo. de 2022
Comentada: rohini more
el 23 de Mzo. de 2022
Code:
n=3
A = eye(n);
idx = randperm(n);
A = A(idx, :)
for i=1:n
for j=1:n
if A(i,j)~=0 && A(i,i)~=1
k1=[i j]
end
end
end
Output:
I have attached pdf below please find the attachment.
Here I got, k1= 1 2 and k1=2 1
But I want
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/937139/image.png)
In set form
But I am getting in matrix form.
How to proceed please give me guideline.
Thanks in advance.
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!