Please help!!!!First input must be a function handle
Mostra commenti meno recenti
this is my code:
syms x;
a = -5;
b = 5;
f = 1/(1+x^2);
n=57;
h = (b-a)/(2*n);
k = linspace(a,b,2*(n+1));
s = arrayfun(f,k);
I want to aplly f to all the elements of k but it gives a error "First input must be a function handle"
Thx for your time
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!