how to plot the vrr functions vrr,3,5,2

1 vue (au cours des 30 derniers jours)
Adalberto
Adalberto le 11 Mar 2023
Commenté : Adalberto le 8 Avr 2023
% 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 commentaires
Adalberto
Adalberto le 11 Mar 2023
gostaria de saber também como faço para pedir ao utilizador a introdução dos valores dos parametros de entrada automaticamente numa determinada função?
Walter Roberson
Walter Roberson le 11 Mar 2023
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.

Connectez-vous pour commenter.

Réponses (1)

Vandit
Vandit le 6 Avr 2023
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.
  1 commentaire
Adalberto
Adalberto le 8 Avr 2023
muito obrigado Vandit

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by