How to put a sequence of text values in one function?
Show older comments
For example,
I have those data
set{1} = [1]
set{2} = [6,7,8]
set{3}= [10,11,12 ]
.............
set{20} = [79,80,81]
and created text value for the next
set_names = 'set{1}'
for a = 2:20
k = sprintf(',set{%d}', a);
set_names = horzcat(set_names,k)
end
Ultimatiely, I want sentence down below works
Answer = combvec(set_names)
which should be identical to this
Answer = combvec(set{1},set{2},set{3},set{4},set{5},set{6},set{7},set{8},set{9},set{10},set{11},set{12},set{13},set{14},set{15},set{16},set{17},set{18},set{19},set{20})
I want to know how to insert saved values(as text form) in function. Not only for this problem, but for other uses.
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!