I don't understand the meaning of the problem. If y=c then x=0. Enlighten me, please.
If y=mx+b, when y=c, x=?
Dan: in my mathematical understanding (correct me if I am wrong): if y=c the slope m of the curve is 0. but for all x the condition y = c is correct, so x should be infinite
Or is there some error in the solution?
The problem description needs to be improved, maybe to something like: Given two points in a Cartesian coordinate system, find the x-value on the line y = a*x+b in which the y-value is equal to a given value c.
The description has been updated.
Nice one. hard to figure this out.
I don't like my solution. I rader prefer David's. JEJE
nice solution :-)
surface of a spherical planet
Back to basics 1 - Saving
We love vectorized solutions. Problem 1 : remove the row average.
Generate a NaN...on purpose
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office