Effacer les filtres
Effacer les filtres

initialize complex values in column vector

1 vue (au cours des 30 derniers jours)
Manu Chaudhary
Manu Chaudhary le 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.
Please help me in correcting my code.
Thanks in advance.

Réponses (1)

Walter Roberson
Walter Roberson le 24 Sep 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?

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by