Effacer les filtres
Effacer les filtres

Can I do this?

1 vue (au cours des 30 derniers jours)
Will
Will le 8 Fév 2012
Modifié(e) : Cedric le 4 Oct 2013
I'm tying to limit the length of an equation by doing this.
Al = @(x) 25.5e3+(300*x(1))+(x(1))^2;
Aj = @(x) (tan((2*pi)/9))*((x(1))^2+(100*x(1))+50);
Ak = @(x) (1000*(200*x(1))*(x(1))^2)/(2*tan((2*pi)/9));
func = @(x) x(3)*(47e3-Al+Aj+Ak);
What am I doing wrong?
I've read the guides on function handles etc, but I just cant understand it! I don't think I'm meant to be a programmer but I have to do this unfortunately.
Thanks in advance

Réponse acceptée

Kevin Holst
Kevin Holst le 8 Fév 2012
It looks like this is all that's wrong:
func = @(x) x(3)*(47e3-Al(x)+Aj(x)+Ak(x));
I'm assuming x is a 3 value vector?
  1 commentaire
Will
Will le 8 Fév 2012
Correct. Thank you. sorry for the stupid questions!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by