MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Need help with using solve

Asked by Sergio on 5 Nov 2012

Would appreciate any help. I'm trying to calculate the intersection between to curves. This are two planck function curves, one for earth and the other for the sun. This would represent the wavelength at wich the incoming solar radiance at the top of the atmosphere is equal to the outgoing terrestrial radiation.

```clc
clear all
```
```syms lambda positive
syms B positive
```
```[lambda,B]=solve('B=(1.19268e-16/(lambda^5))/(exp(0.014414/(lambda*5800))-1)','B=(1.19268e-16/(lambda^5))/(exp(0.014414/(lambda*255))-1)');
```

Jonathan Epperl on 5 Nov 2012

Hey, your code runs for me without error and returns

```lambda =
```
```3.9200466007018968462719148716546e-39
```
```B =
```
```25878.467658733250429897261305422
```

Now this is a tiny wavelength, but then again, the solar radiance might be at a very high frequency.

Anyway, please elaborate on what is going wrong.

Sergio on 5 Nov 2012

Hi Jonathan,

Thanks for running the code and commenting. I ran the code again after I saw your comment and it gave the me same output you pasted. Strange... Anyway, I'm not sure that is the right answer. I'll have to double check what I'm trying to do. I checked on the literature and the value should be something like 5.7 micrometers. Thanks again!

## Products

No products are associated with this question.