Problem 1262. Convert elements in numeric array into different class

Write a function that converts elements in a numeric array into a different class. Example:

a = [1:5]; % class: double
b = convertto(a,'uint32');
b =
         1  2  3  4  5
  ans =

Solution Stats

55.0% Correct | 45.0% Incorrect
Last solution submitted on Oct 21, 2016

Problem Comments


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more