What causes an "Argument to dynamic structure reference must evaluate to a valid field name" error please? code attached.
1 次查看(过去 30 天)
显示 更早的评论
This is my code. I have matlab error saying "Argument to dynamic structure reference must evaluate to a valid field name. Can anyone see a problem please?
freq=-10:0.01:10;
FT2=(1./(2*pi*freq))*(sin.(2*pi*freq))+(1i*cos(2*pi*freq-1.));
Thank you =)
0 个评论
回答(1 个)
David Young
2015-3-24
The dot after sin makes it look like a structure rather than a function call. Omit the dot.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!