Help needed in creating dynamic field names using struct in matrix form.
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I am currently using this code:
rename = sprintf('I%inewEp', i);
newData.(rename) = myData.Ep;
newData.(rename(:,1)) = myData.Ep(:,1) - X; %Error starts from here
newData.(rename(:,2)) = myData.Ep(:,2) - Y;
I keep getting errors when the code performs the subtractions.
Any suggestions would be greatly appreciated. Thank you.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!