I am trying to specify the function x.^2*exp(-x.^2) , but I keep getting the error "Error using * Inner matrix dimensions must agree. " I haven't been able to find a fix on the forums.
Show older comments
x = linspace(0.5,2.5,200);
y = exp(-(x.^2))*(x.^2);
Answers (1)
Walter Roberson
on 5 Aug 2016
y = exp(-(x.^2)).*(x.^2);
Categories
Find more on MATLAB Coder 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!