how to plot the vrr functions vrr,3,5,2
조회 수: 1 (최근 30일)
이전 댓글 표시
% plot Vrr
qvrr = quiver3(RP(1),RP(2),RP(3), vrr,3,5,2,"g"); % vector vrr
qvrr.DisplayName="vrr";
%text(vrr,"Vrr",Color='g')
disp(vrr);
댓글 수: 4
Walter Roberson
2023년 3월 11일
If you are calculating received electrical potential at the point with coordinates (3,5,2) then that would be a single point, and you would not use quiver3() to plot a single point. It is not obvious to me that the received electrical potential is a vector-valued quantity that you would use quiver plots for -- not unless you happened to have two or three sources of energy and were plotting the contribution from each of the sources.
답변 (1개)
Vandit
2023년 4월 6일
I am assuming that here “vrr” is referring to Valence-Rydberg-Rydberg (VRR) contraction functions which is used in quantum calculations.
The following code can be used to plot the “vrr,3,5,2” in MATLAB:
% Define the range of x values for the plot
x = linspace(-1, 1, 100);
% Compute the VRR function values for each angular momentum
vrr_3_5_2 = zeros(size(x));
vrr_3_5_2(x >= 0) = x(x >= 0).^3 .* exp(-x(x >= 0)/2);
vrr_3_5_2(x < 0) = -1/3 * x(x < 0).^2 .* (2*x(x < 0).^2 - 15*x(x < 0) + 35) .* exp(x(x < 0)/2);
% Plot the VRR function values
plot(x, vrr_3_5_2, 'LineWidth', 2);
xlabel('x');
ylabel('VRR_{3,5,2}(x)');
title('Plot of VRR_{3,5,2}(x)');
grid on;
This code defines the range of x values for the plot, and then computes the VRR function values for each angular momentum using the formulas for VRR,3,5,2. The computed values are then plotted using the plot function, and the plot is labelled with axis labels and a title.
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!