Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
May 27, 2007
Messages
1
Location
DE
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
 
Phiw2 = Phiw2 - 180.*(Phiw2>0)

M

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

Part and Inventory Search

Sponsor

Back
Top