Instead of using eval MATLAB allows you to access dynamic struct fields with strings: mystruct.hello=1; mystruct.('hello')=1; % equivalent.
確定! 回上一頁