How can I use a vector inside an @fun?
Show older comments
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.
Accepted Answer
More Answers (1)
Joe Vinciguerra
on 23 Oct 2019
0 votes
Assign 'a' first, then assign 'fun'. In your application I don't believe you can do it the other way around.
1 Comment
Carlos Zúñiga
on 31 Aug 2020
Categories
Find more on Loops and Conditional Statements 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!