Skip to content

Instantly share code, notes, and snippets.

@shaybensasson
Created April 1, 2016 07:43
Show Gist options
  • Select an option

  • Save shaybensasson/ec1d3de3bda99085e804512917236f9a to your computer and use it in GitHub Desktop.

Select an option

Save shaybensasson/ec1d3de3bda99085e804512917236f9a to your computer and use it in GitHub Desktop.
a = {'one' 'two' 'three'};
b = [1 2 3];
ab = cat(1, a, num2cell(b));
sprintf('%s = %d\n', ab{:})
%{
output:
one = 1
two = 2
three = 3
%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment