error: Python exception: ShapeError: Matrix shapes must agree (5, 1) != (4, 1)

1 次查看(过去 30 天)
syms x
f(x)=4*x^2+20*x+4
fplot(@(x) f, [-10 5])
This is what I've written in octave so far and I keep getting this error:
error: Python exception: ShapeError: Matrix shapes must agree (5, 1) != (4, 1)
occurred at line 3 of the Python code block:
return x.multiply_elementwise(y.applyfunc(lambda a: 1/a)),
error: called from
pycall_sympy__ at line 178 column 7
rdivide at line 104 column 5
interp1 at line 307 column 13
fplot at line 201 column 8
Like, I freaking don't get it. What am I doing wrong? Thanks in advance!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by