Creating structure using eval function
Show older comments
hello I need to create structure using eval function
required structure
laminate =
var1 = [0 0 0 0 0 0 0 0 0]
where
value = zeors(3);
evalin('base',['Laminate','=struct(''',''',var1,'''',''',value,''')'])
matlab error
Error using ==> horzcat CAT arguments dimensions are not consistent.
but for var1 = 'any string' is accepted
any idea to solve this problem.
Accepted Answer
More Answers (0)
Categories
Find more on Variables 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!