Combining a number and a string array (both columns) into a single column string array.

1 view (last 30 days)
How can the number array:
and the string array:
be combined to give a string array?

Answers (2)

Stephen23 on 15 Feb 2022
The simple MATLAB approach:
V = linspace(1,10,10);
S = "X=" + V(:)
S = 10×1 string array
"X=1" "X=2" "X=3" "X=4" "X=5" "X=6" "X=7" "X=8" "X=9" "X=10"

David Hill
David Hill on 14 Feb 2022

Community Treasure Hunt

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

Start Hunting!

Translated by