Changes a decimal number to a fraction within a given accuracy
num = 22
den = 7
num = 106
den = 333
num = 11
den = 19
This function already exists in Scilab: Have a look at rat()
1. If I cannot find a function immediately, then it might as well not exist. This is one
of the problems with Scilab documentation.
For example, the following search terms do not get the proper function:
When I type if 'rat' the response is 'Floating point rational approximation' which is not
a useful description of what I am looking for. I want to convert a decimal number to a
2. Who said posts in the file exchange have to complement functions in Scilab ?!?
I would like to make a check the accuracy on the number of the decimals after the comma,
in a matriz.
For example I will divide 1 number by another and the result will approximate to 0, it
will be like 0.999999934757613
I want the calculation check to be as accurate as 9 points after the comma, so in my
calculation the program will check while x <= 0.0000000001 ...run the following code...
ANd it will stop when the accuracy reach 9 digits close to 1.
Is there a command like this in scilab, i remember at R, this command is epsolon i
I'm new to SciLab and using it at home to do Linear Algebra homework. In the classroom
we are using MatLab which can be configured to show decimal values in fraction format
via command "format rat". Since I couldn't find a way to do the same in SciLab I
looking for a way to decimals converted to fraction in SciLab.
Where can I get this "dec2frac" function that David Adams posted here? (I was
for some link to download but didn't find any).
How do I install and use it in SciLab?
Also, about the native rat() function, how can I use it? The documentation is cryptic
and didn't help at all.