Cody

Problem 43972. Binary code for an analog signal

Solution 1100764

Submitted on 9 Jan 2017 by James
  • Size: 23
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
NoBits =6; xmin = -5; xmax = 5; AnalogValue = [-2 -1 0 1 2]; BitCode=['010011' ; '011010' ; '100000' ; '100110' ; '101101']; assert(isequal(Digitization(NoBits,AnalogValue,xmin,xmax),BitCode))

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!