How can I use a vector inside an @fun?
显示 更早的评论
Hello everyone,
I want to define a function like "fun = @(x) sin(a*x)" where "a" is a vector of n dimention.
Do you have any idea?
Thank you for your support.
Greetings.
采纳的回答
更多回答(1 个)
Joe Vinciguerra
2019-10-23
0 个投票
Assign 'a' first, then assign 'fun'. In your application I don't believe you can do it the other way around.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
