Need Help with a Simple Symbolic Equation Solve in Matlab 2015a
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I am trying the following code in Matlab 2015a. It cannot solve it. Correct solution should be simply k. Could you tell me what is wrong?
syms Z k
assume(Z,'real')
assume(k,'real')
[Z]=solve(abs(k/(k+1i*Z))==1/sqrt(2));
Z=????
2 comentarios
  Roger Stafford
      
      
 el 24 de Jul. de 2015
				Without your assumptions that k and Z are real, the solution for any given k would be Z = w*k where w = x+1i*y is any point on the circle in the complex plane:
   x^2 + (y-1)^2 = 2
In other words there would be an infinite continuum of possible solutions and 'solve' could not give you an answer.
Given that k and Z must be real, the solution is thereby restricted to the two points, Z = k and Z = -k, where the circle crosses the real line, so that 'solve' could and should have given you that answer. I suspect that the combination of the given assumptions together with the 'abs' operator confused Mathworks' 'solve' to the point where it was unable to give this simple answer.
Respuestas (4)
  Torsten
      
      
 el 24 de Jul. de 2015
        Maybe
[Z]=solve(abs(k/(k+1i*Z))==1/sqrt(2),Z);
?
Best wishes
Torsten.
0 comentarios
  Sean de Wolski
      
      
 el 24 de Jul. de 2015
        One equation with two unknowns. What do you expect?
Torsten's suggestion gives you the result for Z:
ZZ = solve(abs(k/(k+1i*Z))==1/sqrt(2),Z);
ZZ = k*1i - 2^(1/2)*exp(z*2i)*abs(k)*1i
But it will of course include k because you have two unknowns.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




