Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create new matrice step by step

Status
Not open for further replies.

joefx23

Electrical
May 27, 2007
1
hi
sorry my english is not so good.

i have the following problem

for ind=1:1:length(Phiw)
if Phiw(ind) > 0
[Phiw2(ind) := Phiw(ind)-180]
else
[Phiw2(ind) := Phiw(ind)]
end
end

i want to check whether phiw is positive and substract 180 if it is

but matlab doesnt like the 'Phiw2(ind) = ' statement..

i hope you understand what i want to do.
what can i change that it works? or is there an easier way?

btw: Phiw is createt by a negative arctan...

thanks joe
 
Replies continue below

Recommended for you

Phiw2 = Phiw2 - 180.*(Phiw2>0)

M

--
Dr Michael F Platten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor