understand how a logical vector can be used as an address in

understand how a logical vector can be used as an address in math lab
understand how a logical vector can be used as an address in math lab
understand how a logical vector can be used as an address in math lab

Solution

The results of a relational operation with vectors, which are vectors with 0’s and 1’s, are called logical vector and can be used for addressing vectors. When it is for addressing another vector, it extracts from that vector the elements in the positions where the logical vector has 1’s. For example:

>> x = [-2 4 -5 6]; y = [2 8 -4 7];
>> t = x>=0;
>> t

t =

0 1 0 1

>> y(t)

ans =

8 7

 understand how a logical vector can be used as an address in math lab understand how a logical vector can be used as an address in math lab understand how a lo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site