Help with a loglogplot in maple please

  • Maple
  • Thread starter elarson89
  • Start date
  • Tags
    Maple
In summary, the speaker is seeking help with a loglogplot in Maple for their physics homework. They have all the necessary code and constants, but are encountering an empty plot error. Another person suggests that they may have some constants wrong, specifically the order of magnitude for Boltzmann's constant. After correcting the constant, the issue is resolved.
  • #1
elarson89
20
0
Help with a loglogplot in maple please!

Hi all,

I have some physics homework that I'm trying to finish tonight. I have it all done and everything, and now all i have to do is make a plot. I'm trying to do a loglogplot of Planck's Law. Here's my code:


with(plots);

c:=2.998*10^8;
k:=1.381*10^(23);
h:=6.626*10^(-34);
t:=4500;

Plancks_Law:=x->(8*Pi*h/(c^3))*(x^3/(exp(h*x/(k*t))-1));



and all I'm doing to try to plot is, loglogplot(Plancks_Law(x),x=1..10000);

I don't care what the domain is, but anything i try gives me an empty plot error. Any suggestions??

Thanks
 
Physics news on Phys.org
  • #2


I think you have some constants wrong.
When I evaluate h / (k t) with your numbers, I get something like 10-60 while it should be like 10-14.
As a consequence, unless you take x = 1060, your exponential will be very close to 1, so your denominator becomes 1 - 1 = 0.

Follow-up: try k:=1.381*10^(-23) instead of k:=1.381*10^(23).
 
  • #3


genius! I had boltzmann's constant to be of order 10^23, not 10^-23. Thanks a ton!
 

1. How do I create a loglogplot in Maple?

To create a loglogplot in Maple, you can use the plot command and specify "loglog" as the type of plot. For example, you can use the command "plot(log(x), x=1..10, type=loglog)" to create a loglogplot of the logarithmic function from 1 to 10.

2. How can I customize the appearance of my loglogplot in Maple?

You can use various options within the plot command to customize the appearance of your loglogplot in Maple. Some options include changing the colors, labels, and axes ranges. You can refer to the Maple documentation for a full list of available options.

3. Can I plot multiple functions on the same loglogplot in Maple?

Yes, you can plot multiple functions on the same loglogplot in Maple by using the plot command with multiple functions and specifying "loglog" as the type of plot. For example, you can use the command "plot({log(x), log(2x)}, x=1..10, type=loglog)" to plot both logarithmic functions on the same loglogplot.

4. How do I add a legend to my loglogplot in Maple?

To add a legend to your loglogplot in Maple, you can use the legend option within the plot command. For example, you can use the command "plot({log(x), log(2x)}, x=1..10, type=loglog, legend=["log(x)", "log(2x)"])" to add a legend with custom labels for each function.

5. Is there a way to export my loglogplot in Maple to an image file?

Yes, you can export your loglogplot in Maple to an image file by using the exportplot command. For example, you can use the command "exportplot(plot(log(x), x=1..10, type=loglog), "myplot.png")" to export your loglogplot as a PNG image file.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
202
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
157
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Back
Top