fork download
  1. function xxx = decpt2bin(xx)
  2. %The function converts column-wise if an array is provided.
  3. %Range 1024.999 i.e.1024999 to 20 bit number
  4. if(xx>1024.999)
  5. xxx=(dec2bin(0,20));
  6. return;
  7. else
  8. yy=abs(xx*1000);
  9. xxx=(dec2bin(yy,20));
  10. end
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty