i dont know why there is no anwser about this 'solve'
1 回表示 (過去 30 日間)
古いコメントを表示
clc;
close all;
clear;
a1=20;
b1=20;
k1=sqrt((a1+10)^2+b1^2)-sqrt((a1-10)^2+b1^2)
syms a b k;
equ2= a==20;
equ3= b==20;
equ1= k==sqrt((a+10)^2+b^2)-sqrt((a-10)^2+b^2);
k=solve(equ1,equ2,equ3,k)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1318000/image.png)
0 件のコメント
採用された回答
Fabio Freschi
2023 年 3 月 8 日
編集済み: Fabio Freschi
2023 年 3 月 8 日
Your call to solve is incorrect
clear all
syms a b k
equ2= a==20;
equ3= b==20;
equ1= k==sqrt((a+10)^2+b^2)-sqrt((a-10)^2+b^2);
sol=solve([equ1; equ2; equ3],[k a b])
その他の回答 (1 件)
Torsten
2023 年 3 月 8 日
編集済み: Torsten
2023 年 3 月 8 日
Three equations need three unknowns, not only one.
clc;
close all;
clear;
a1=20;
b1=20;
k1=sqrt((a1+10)^2+b1^2)-sqrt((a1-10)^2+b1^2)
syms a b k
equ2= a==20;
equ3= b==20;
equ1= k==sqrt((a+10)^2+b^2)-sqrt((a-10)^2+b^2);
sol=solve([equ1,equ2,equ3],[a b k])
k = double(sol.k)
3 件のコメント
Torsten
2023 年 3 月 9 日
編集済み: Torsten
2023 年 3 月 9 日
All the points on the blue curve below are solutions. MATLAB cannot list all of them - thus it lists none.
hold on
fimplicit(@(a,b)sqrt((a+10).^2+b.^2)-sqrt((a-10).^2+b.^2)-(sqrt((20+10)^2+20^2)-sqrt((20-10)^2+20^2)),[0 40 0 40])
plot(20,20,'o')
hold off
grid on
参考
カテゴリ
Help Center および File Exchange で Polynomials についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!