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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by