MATLAB: How to evaluate integral with given constant integration syms x; f = 'h*x'; h =3; int(sym(f)) My code gives (h*x^2)/2 But I want it to evaluate it for h = 3 and then print the answer Best Answer Hi,change the order of your commandssyms x;h = 3;f = h*x;int(sym(f))gives:ans =(3*x^2)/2Best regardsStephan Related QuestionHow to convert Maple Code to Matlab CodeEvaluating constantsSolving a complex integralEvaluate a Hankel integralEvaluate advanced integral numerically
Best Answer