What is the meaning of the symbol (') at the end of linspace?
조회 수: 6 (최근 30일)
이전 댓글 표시
Juan Carlos Ponce Campuzano
2021년 3월 13일
댓글: Juan Carlos Ponce Campuzano
2021년 3월 13일
Hello everyone,
I just started learning MATLAB. I was reading the documentation to plot discrete sequences: https://au.mathworks.com/help/matlab/ref/stem.html
I tried these lines of code online:
figure
X = linspace(0,2*pi,50)';
Y = [cos(X), 0.5*sin(X)];
stem(X,Y)
What is the meaning of the symbol (') in the linspace command before (;)? I can't find documentation about it. I noticed that if I remove it I get the error: X must be same length as Y.
Any help will be appreciate it. Thanks.
댓글 수: 0
채택된 답변
Juan Carlos Ponce Campuzano
2021년 3월 13일
댓글 수: 2
Steven Lord
2021년 3월 13일
That is correct. It is the conjugate transpose operator. If your data may be complex you should use the transpose operator .' if you don't want to take the conjugate.
x = (1:5)+(6:10)*1i % positive imaginary parts
yConjugate = x' % negative imaginary parts
yNonconjugate = x.' % positive imaginary parts
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!