function with float and integer, MATLAB Programming

Assignment Help:
hi i have this programm
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 =double(IRN/2303)
return

end

and when i am calling the function the number returns zero and it is not correct because it must be returned 0.2657 with IRN=183

Related Discussions:- function with float and integer

Various commands for get the help, Various commands for get the help: T...

Various commands for get the help: There are various commands which can serve as an introduction to MATLAB and allow you to get the help: info will show contact informatio

ANFIS, How to design a FIR filter using ANFIS in MATLAB

How to design a FIR filter using ANFIS in MATLAB

Illustration of for loop, illustration of for loop: illustration, to p...

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

Vectors and matrices, Vectors and Matrices: The Vectors and matrices a...

Vectors and Matrices: The Vectors and matrices are used to store sets of values, all of which are similar type. A vector can either be a column vector or a row vector. The mat

Write a program that computes the cost, The cost of sending a package by an...

The cost of sending a package by an express delivery service is $15 for the first two pounds, and $4.25 for each pound over two pounds. Write a program that computes the cost of

how to call matlab in batch mode, This can be done from the command line o...

This can be done from the command line or from a makefile. You require a script (filename.m). Just type at the command line, or contain in the makefile: matlab

Illustration of modifying elements, Illustration of Modifying Elements: ...

Illustration of Modifying Elements: Illustration, the fifth element in the vector newvec is 9 >> newvec(5) ans = 9 The subset of a vector, that would be a vector it

Calculate the bandwidth of this filter matlab, The purpose of this lab is ...

The purpose of this lab is to enhance the ECE311 student's understanding of filter behavior and filter design and to provide the student the opportunity to demonstrate skills in li

Logical operators, logical operators: The logical operators are as sho...

logical operators: The logical operators are as shown below: All the logical operators operate on Boolean or logical operands. The not operator is a unary operator; wh

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd