help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resolution exercise Octave


From: Samuele Zampini
Subject: Re: Resolution exercise Octave
Date: Mon, 20 Apr 2020 10:57:43 +0200

I think that a couple of "for" loops are enough.

Check each element and place there 0 or 1.


HTH,
Samuele



On Mon, Apr 20, 2020 at 10:18 AM Simone <address@hidden> wrote:
Hello
I am trying to solve an exercise on Octave and would like some help.
I have a matrix A (10x5) with numbers from 1 to 80 random.
>From this matrix, 5 numbers are drawn, forming matrix B (1x5).
I need to generate another matrix (10x5), where the numbers in matrix B are
equal to A returns the value 1 and if different, returns the value 0. How
can I do this?
Thank you!



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]