initialize complex values in column vector
4 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Walter Roberson
2022-9-24
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?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!