What is the meaning of the symbol (') at the end of linspace?
6 views (last 30 days)
Show older comments
Juan Carlos Ponce Campuzano
on 13 Mar 2021
Commented: Juan Carlos Ponce Campuzano
on 13 Mar 2021
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 Comments
Accepted Answer
Juan Carlos Ponce Campuzano
on 13 Mar 2021
2 Comments
Steven Lord
on 13 Mar 2021
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
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!