Error using symfun>validateArgNames (line 333) Second argument must be a scalar or vector of unique symbolic variables.
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ahmad Nur Hasybi
am 26 Dez. 2020
Kommentiert: Ahmad Nur Hasybi
am 27 Dez. 2020
What can I do? Please ur help!
close all
clc
clear
syms x y;
x= (-13:13);
y =symfun( x + exp(x), x);
figure(1)
fplot(x,y)
grid on
That code give me an Error like
Error using symfun>validateArgNames (line 333)
Second argument must be a scalar or vector of unique
symbolic variables.
Error in symfun (line 78)
y.vars = validateArgNames(inputs);
Error in coba_ae (line 7)
y =symfun( x + exp(x), x);
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 26 Dez. 2020
Bearbeitet: Mischa Kim
am 26 Dez. 2020
Hi Ahmed, almost there:
syms x y
y = symfun(x + exp(x),x);
figure(1)
fplot(y,[-13,13])
grid on
In your code you declare x to be a nummeric vector, however, to create the symbolic function y it needs to be a symbolic variable.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Variables, Expressions, Functions, and Preferences finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!