Code Comments
Programming Forum and web based access to our favorite programming groups.hello i require to take the modulus of a particular result.. the command in the help window gives the mod of the remainder,... example AM = a1(1,2) / ( a1(1,1)*r) here, a1 matrix and r are already defined. i require the modulus of AM for further calculations.. that is.. i want to take the positive value even if the result if negative. plz help
Post Follow-up to this messageIn article <ef078be.-1@webx.raydaftYaTP>, neha <neha_goyal85@yahoo.co.in> wr ote: > hello > > i require to take the modulus of a particular result.. > > the command in the help window gives the mod of the remainder,... > example > AM = a1(1,2) / ( a1(1,1)*r) > here, a1 matrix and r are already defined. > > i require the modulus of AM for further calculations.. > that is.. i want to take the positive value even if the result if > negative. > > plz help ----- There is a function 'mod' which will give you a non-negative result if your divisor is positive. That is, mod(8,5) = 3, mod(-8,5) = 2. What do you plan to use as the divisor - is it the denominator above, a1(1,1)*r? If so, you need that to always be positive. (Remove "xyzzy" and ".invalid" to send me email.) Roger Stafford
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.