Not enough input arguments.
显示 更早的评论
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)
回答(1 个)
dpb
2014-3-16
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!