# Intersection point

Posted 5 months ago
655 Views
|
|
0 Total Likes
|
 Hi,I was trying to do a program with units. I want to find the intersection point of two functions cau=Quantity[Range[.1,1,.2],"Meters"^3/"Seconds"]; h=Quantity[{100,90,78,64,46},"Meters"]; hs=Quantity[{50,60,72,86,108},"Meters"]; fh=Interpolation[Transpose[{cau,h}]]; (*function 1*) fhs=Interpolation[Transpose[{cau,hs}]]; (*function 2*) cau1=cau1/.FindRoot[fh[cau1]==fhs[cau1],{cau1,.1}] Is it possible?
 Just my guess: Interpolation and InterpolatingPolynomial are not (yet?) compatible with physical units. The documentation for QuantityVariable shows an example of DSolve with units: DSolve[{Derivative[1][QuantityVariable[x, "Length"]][ QuantityVariable[t, "Time"]] == Quantity[5, "Meters"/"Seconds"]}, QuantityVariable[x, "Length"][ QuantityVariable[t, "Time"]], QuantityVariable[t, "Time"]] but the equivalent for NDSolve does not work, at least with the following syntax: NDSolve[{Derivative[1][QuantityVariable[x, "Length"]][ QuantityVariable[t, "Time"]] == Quantity[5, "Meters"/"Seconds"]}, QuantityVariable[x, "Length"][ QuantityVariable[t, "Time"]], {QuantityVariable[t, "Time"], Quantity[0, "Seconds"], Quantity[10, "Seconds"]}]