initialize complex values in column vector

1 visualizzazione (ultimi 30 giorni)
Manu Chaudhary
Manu Chaudhary il 24 Set 2022
Risposto: Walter Roberson il 24 Set 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.
Please help me in correcting my code.
Thanks in advance.

Risposte (1)

Walter Roberson
Walter Roberson il 24 Set 2022
Suppose that you had coded
[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?

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by