problem conversion to char from logical why?

1 view (last 30 days)
ello
can somebody help me solve this?
my code so far:
clc;
clear all;
syms x y;
eqn=((x*sqrt(x)-y*sqrt(y))/(sqrt(x)-sqrt(y))+sqrt(x*y)*((sqrt(x)-sqrt(y))/(x-y))^2) == 0;
solx=solve(eqn,x)
soly=solve(eqn,y)
thanks
  1 Comment
Stephen23
Stephen23 on 15 Sep 2015
Edited: Stephen23 on 15 Sep 2015
@Jan Bozic: I edited your question to correctly insert the image and format your code. Next time you can do it yourself by using the buttons along the top of the textbox (do not write HTML code in the text).

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 15 Sep 2015
You are using MATLAB before R2010b (or was it R2011b?)
Replace
eqn=((x*sqrt(x)-y*sqrt(y))/(sqrt(x)-sqrt(y))+sqrt(x*y)*((sqrt(x)-sqrt(y))/(x-y))^2) == 0;
with
eqn = ((x*sqrt(x)-y*sqrt(y)) / (sqrt(x)-sqrt(y)) + sqrt(x*y)*((sqrt(x)-sqrt(y)) / (x-y))^2) - 0;
The spacing only affects the readability but changing the "== 0" to "- 0" should fix the conversion problem.
  2 Comments
Jan Bozic
Jan Bozic on 15 Sep 2015
hi, thanks for fast answer, i'm using 2010a version.
Walter Roberson
Walter Roberson on 15 Sep 2015
Yes! The Mind Reading Toolbox scores again!

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!