# Answer to Question #36328 in MatLAB | Mathematica | MathCAD | Maple for rena

Question #36328

hi I have this function in matlab

function [IRN,number ] = randnumbers( IRN )

IRN=int32(IRN);

ITOTAL=(IRN*330)+100;

ITOTAL=int32(ITOTAL);

IQUOTIENT=ITOTAL/2303;

IQUOTIENT=int32(IQUOTIENT);

IRN=ITOTAL-(IQUOTIENT*2303);

IRN=int32(IRN);

number=((IRN)./(2303));%%real number 0.2657

and for IRN=183 when I called the function the result tha I takes for number is 0 but it should be 0.2657.The way I called is [IRN,number]=randnumbers(IRN)

function [IRN,number ] = randnumbers( IRN )

IRN=int32(IRN);

ITOTAL=(IRN*330)+100;

ITOTAL=int32(ITOTAL);

IQUOTIENT=ITOTAL/2303;

IQUOTIENT=int32(IQUOTIENT);

IRN=ITOTAL-(IQUOTIENT*2303);

IRN=int32(IRN);

number=((IRN)./(2303));%%real number 0.2657

and for IRN=183 when I called the function the result tha I takes for number is 0 but it should be 0.2657.The way I called is [IRN,number]=randnumbers(IRN)

Expert's answer

#### Not answered

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment