help-octave
[Top][All Lists]
Advanced

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

Re: Resolution exercise Octave


From: Nicholas Jankowski
Subject: Re: Resolution exercise Octave
Date: Mon, 20 Apr 2020 10:32:15 -0400

On Mon, Apr 20, 2020 at 4: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!

look at the help for function 'ismember'.  I believe it will do exactly what you're looking for. 

reply via email to

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