[Top][All Lists]

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

Re: select equal element between matrices

From: Francesco Potortì
Subject: Re: select equal element between matrices
Date: Mon, 11 Feb 2019 17:02:49 +0100

>i've this vector:
>a=[3 2 5 5 6 6 2 3] 
>b=[0 1 0 0 1 1 0 0] 
>i want to concatening element of string:
>column 1: a(3)+b(0)+c("a") = 30a
>column 2: a(2)+b(1)+c("b") = 21b
>column 3: a(5)+b(0)+c("a") = 50b

As Thomas Dean has pointed out, have a look at num2str, consider that
you want column vectors (a' is a column vector), and that you should
better understand hw indices work: a(3) is 5!

In short, you want to concatenate strings, and you should convert
numbers to strings to do that.

Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:

reply via email to

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