A=[10 42 55;63 52 81;30 52 14];
k=A(A>50);
Hello everyone.From this code i got output as
k=
63
52
52
55
81
But I want like this [0 0 55; 63 52 81; 0 52 0]..can anyone suggest me how to get this..Your help is appreciated.
Thanks in advance...

 Respuesta aceptada

Stephen23
Stephen23 el 15 de Abr. de 2020
>> A = [10,42,55;63,52,81;30,52,14];
>> k = A.*(A>50)
k =
0 0 55
63 52 81
0 52 0

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Abr. de 2020

Comentada:

el 16 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by