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

1 回表示 (過去 30 日間)
Andreea Oana
Andreea Oana 2022 年 1 月 5 日
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 Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by