# initialize complex values in column vector

1 view (last 30 days)
Manu Chaudhary on 24 Sep 2022
Answered: Walter Roberson on 24 Sep 2022

data =[230 + 1j*220 240+1j*240 220+1j*200 200+ 1j*150 210 +1j*221 180+1j*180 185+1j*230 150+1j*100]
My above code is not initializing a column vector with complex values.

Walter Roberson on 24 Sep 2022
[1 0 -1]
then how many values would you expect as a result? Is that to be interpreted as ([(1), (0)]-1) = [(0),(negative 1)]? or is it [(1),(0 minus 1)] = [(1), (negative 1)] ? Or is it [(1),(0),(negative 1)]?
How about [1 0 - 1]? How about [1 0-1]? Are the three different forms all equivalent, or are there differences?
Now consider the three forms [1 0 +1] [1 0 + 1] [1 0+1]. Are they all equivalent to each other or are there differences?
Is there a spacing syntax with - that is interpreted a different way (in determining number of results) than the same spacing syntax would get for the case with + in the exact same locations?
If the three forms with - are all the same, then what is the correct form using spaces to create the list of one then zero then negative one?