imaginary number
5 views (last 30 days)
Show older comments
okay this should be simple, but it's not working. i'm just trying to assign a name to the imaginary part of Sload, but i'm getting an error message.
here's the script:
Sload = VldRect*(conj(IC1Rect+IC2Rect+IindRect))*.5
Pload = real(Sload)
Qload = imag(Sload)
here's the output:
Sload =
0.0170 + 0.0003i
Pload =
0.0170
??? Subscript indices must either be real positive integers or logicals. Error in ==> Matlab_project_2_newest at 175
Qload = imag(Sload)
0 Comments
Answers (2)
Walter Roberson
on 5 Jun 2012
In your earlier Question, you defined "real" and "imag" as variables in your script, overriding their use as functions. Until you
clear real imag
or restart MATLAB, your scripts are going to continue to find those as being variables.
0 Comments
See Also
Categories
Find more on Import, Export, and Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!