initialize complex values in column vector

조회 수: 1 (최근 30일)
Manu Chaudhary
Manu Chaudhary 2022년 9월 24일
답변: Walter Roberson 2022년 9월 24일

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.

답변 (1개)

Walter Roberson
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?

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by