1 2 3 4 5 6 7 8 9
clear //Variable declaration n=7046 //Hex number //Calculations h = dec2hex(n) //decimal to hex conversion //Result printf ("The hexadecimal equivalent of 7046 is %s ",h)