Solve function is unable to find an explicit solution
조회 수: 1 (최근 30일)
이전 댓글 표시
This is my code. It is not there entirely.It is almost like this.
clc;
% Read image
I=imread('03022017_subset.tif');
sigma0_VH=I(:,:,1);
sigma0_VV=I(:,:,2);
LIA=I(:,:,3); %Local Incidence angle
[m,n,p]= size(I);
er=sym('er',[m,n]); % declaring dielectric constant as symbolic variable matrix
o=ones(m,n);
L=4;
pow=10;
x=0;
s=0.5;
w=((pi.*(L.^(2)))./pow).*(exp(-(((L.^(2)).*((((2.244.*sind(LIA).*cosd(x))-(1.121997.*(sind(LIA)))).^2)+((2.244.*sind(LIA).*sind(x)).^2))))./(4.*pow)));
SIvv=symsum(Ivv,z,1,Inf);
eqsigmavv=sigma0_VV-((1.258877268./4.*pi).*(exp(-2.*1.258877268.*(s.^2).*((cosd(LIA)).^2))).*((abs(SIvv)).^2).*(w./factorial(pow)))==0;
dcvv=solve(eqsigmavv,er);
solve function of 'dcvv' returning an answer of 1 by empty. But it is not what expected to get. The value of eqsigmavv is very lengthy. It is showing truncated in display. And some variable 'r' which is never declared in the programe is also included in it.
댓글 수: 7
Walter Roberson
2018년 7월 3일
I think I will need the .tif for testing.
You did not answer my questions about how you intend your floating point constants to be interpreted: do you intend them to be interpreted as implicit rationals in base 10, or do you intend them as implicit rationals in base 2 (which is how floating point is stored internally) ?
If you had the floating point constant 0.333333 in your code, would you intend that to represent the rational 1 divided by 3, or would you intend it to represent the rational 333333 divided by 1000000, or would you intend it to represent the rational 3002396749180579 divided by 9007199254740992 ? These choices matter when you are using solve(), since solve() asks for the exact solution, and it is a mistake to ask for the exact solution for an expression with vague input values.
Perhaps you should be using vpasolve()
답변 (2개)
Sandra Maria Cherian
2018년 7월 5일
편집: Sandra Maria Cherian
2018년 7월 5일
댓글 수: 13
Walter Roberson
2018년 7월 6일
Slightly better (at least for my implementing function):
2.09709586957955585, 4.50416224972559576, 5.13972527850544925
2.23993701810814461, 4.92827672315921195, 6.09692340175298675
2.57220009290275931, 3.87915792241145541, 4.59424410673230277
I tested with the range 20 to 90 as bounds, and all of the entries except possibly the first two quickly pinned themselves against the 20 lower bound (it looked like one of the first two might perhaps have been marginally different than 20 for the minimum value under the circumstance that all of the other values were 20.)
With that code, there is no way that there is a solution with any of the components required to be as large as 20.
참고 항목
카테고리
Help Center 및 File Exchange에서 Special Values에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!