Warning: Error updating FunctionLine
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have written 3 simple lines of code to plot a function. Here is my code:
n=2;
omega=@(r) log(factorial(r+n-1))-log(factorial(r))-log(factorial(n-1));
fplot(omega,[0 150],'b')
When I plot it, it gives me the following error message: "Warning: Error updating FunctionLine".
In case this information is useful, the function is the natural log of the multiplicity of an Einstein Solid. The multiplicity is given by
. Where n is the number of oscillators and r is quanta of energy. When we take natural log, we get
. I checked in the command window, and the largest factorial that MATLAB can calculate is the factorial of 170, but it never has to calculate the factorial of a number greater than 170 while
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/524369/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/524374/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/524379/image.png)
0 comentarios
Respuestas (1)
Walter Roberson
el 19 de Feb. de 2021
factorial is only for integers but fplot uses nonintegers
1 comentario
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!