Not enough input arguments.
Afficher commentaires plus anciens
Hi!! im new on matlab and i have this problem today
I defined a vector x=linspace(-1,1.50) with 50 columns,
and then i want the output from this function f = cos(2*x+1)+x.^2+x.*sin(x)+(1/3)*exp(x/5) 50 numbers,
so i make this function
function [ f ] = funcion( x ) %UNTITLED Summary of this function goes here % Detailed explanation goes here f = cos(2*x+1)+x.^2+x.*sin(x)+(1/3)*exp(x/5)
but when i call it i get the error Not enough input arguments. at this line f = cos(2*x+1)+x.^2+x.*sin(x)+(1/3)*exp(x/5)
Réponses (1)
dpb
le 16 Mar 2014
function [ f ] = funcion( x )
f = cos(2*x+1)+x.^2+x.*sin(x)+(1/3)*exp(x/5);
Looks ok other than you're missing a dot operator on the term _(1/3).*exp(...)
Need error in context w/ the line that tried to call it.
Catégories
En savoir plus sur Image Arithmetic 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!