trying to plot a harmonic function, but i keep getting an fplot error.

code:
clear all
clc
syms x y
u = x^2 - y^2;
for c = 2:2:20
result(:,c) = solve(u == c);
end
fplot(result)
error:
Operands to the logical and (&&) and or (||) operators must be convertible to logical scalar values.
Error in fplot (line 119)
~all(feval_internal(symengine,'symobj::map',formula(fn{k}),'testtype','Type::Arithmetical'))

 採用された回答

Star Strider
Star Strider 2021 年 11 月 2 日
Try this —
syms x y
u = x^2 - y^2;
figure
hold on
for c = 2:2:20
result = solve(u == c);
fplot(result)
end
hold off
grid
.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

製品

リリース

R2021a

タグ

質問済み:

2021 年 11 月 2 日

回答済み:

2021 年 11 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by