beginner code troubleshooting, matrix dimensions must agree

hello guys, first post here, and the question is so simple but i'm still a beginner,
i'm having a heat transfer class and in it i saw a graph of Monochromatic Luminosity plotted as a function of heat and wavelength, i wanted to try and do it in MatLab myself, but i'm getting the matrix dimensions must agree error, that's where i could use some help, thank you in advance this is a capture of what I've done, </matlabcentral/answers/uploaded_files/97976/matlab.JPG>

 Accepted Answer

The problem is using ‘T’ as a subscript here:
L(T) = (cl'*ld.^-5)/exp(c2'/ld*T')-1);
Just do:
L = (cl'*ld.^-5)/exp(c2'/ld*T')-1);
I didn’t run your code because I didn’t feel like typing it in. It is always better to copy your code and paste it here, then highlight it and use the [{}Code] button to format it.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!