Hi, need help figuring the problem in my code as it keeps saying Undefined operator '*' for input arguments of type 'inline'.
Afficher commentaires plus anciens
clear all; clc; close all; u=[2 0 1 5 1 7 4 3 3]; n=max(u); m=mean(u); syms x; f=inline((x-m)^n)*exp(-(-x - m)^2); gf=ezplot(f,[-2,8]); hold on grid on df=diff(f(x),1); xin=solve(f(x)); xint=[xin,zeros(length(xin),1)]; yin=[0,f(0)]; plot(xint(:,1),xint(:,2),'+'); plot(yin(:,1),yin(:,2),'+'); hold on crit=solve(df); critp=[crit,f(crit)]; plot(critp(:,1),critp(:,2),'+') hold on dff=diff(f(x),2); inf=solve(dff); infp=[inf,f(inf)]; plot(infp(:,1),infp(:,2),'+');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Scope Variables and Generate Names dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!