In the program below, the result of(adsbygoogle = window.adsbygoogle || []).push({}); "difr" is not zerobut according to the definition of qx in the second line, I expect it to be zero (because [itex]qx^2+ky^2=(\frac{ef-u}{hbarv_f})^2[/itex]). What is the problem?

Code (Text):

ef=1;hbarv_f=658;ky=0.0011;u=2.5;

qx=sqrt(((ef-u)/hbarv_f)^2-ky.^2);

difr=(ef-u)/hbarv_f-sqrt(qx^2+ky^2)

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Unexpected inequality in Matlab

Loading...

Similar Threads - Unexpected inequality Matlab | Date |
---|---|

Mathematica DSolve output with unexpected parameters | Nov 20, 2017 |

Unexpected result of the "find" command in Matlab | Feb 19, 2015 |

Unexpected operator for 'plotinequality' | Feb 18, 2013 |

Matlab fmincon violates nonlinear inequality during search | Jun 3, 2012 |

'unexpected matlab expression' | Feb 18, 2010 |

**Physics Forums - The Fusion of Science and Community**