this programme in matlab 2017b but icant run it
Show older comments
syms x;
syms E;
syms a;
p(x) =(sqrt(2*(E-potential(x,a))))
q = integral(p(x),0,x)
function [v] = potential(a,x)
v= a.*x
end
2 Comments
Rik
on 13 Aug 2018
Today I formatted your code. Next time, you can do it yourself by selecting your code and pushing the {}Code button.
Accepted Answer
More Answers (1)
Walter Roberson
on 13 Aug 2018
1 vote
p is defined in terms of the symbolic variable a. integral() is for numeric integration and cannot be used with unresolved symbolic variables.
Please recheck the order of parameters for your function. You define the function with one order but you call it with a different order.
Categories
Find more on Calculus 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!