blob: 93b1b450f95d4cba4b2c910e4dcc473e4d58ec17 (
plain)
1
2
3
4
5
6
7
8
9
10
|
//example 1.2
//percentage accuracy
//page 9
clc;clear;close;
x=0.51;// the number given
n=2;//correcting upto 2 decimal places
dx=((10^-n)/2)
p_a=(dx/x)*100;//percentage accuracy
printf('the percentage accuracy of %f after correcting to two decimal places is %f',x,p_a);
|