How to plot this formula in matlab?

 Respuesta aceptada

Image Analyst
Image Analyst el 7 de Nov. de 2020
Editada: Image Analyst el 7 de Nov. de 2020
Isn't it just
phi = linspace(-4, 4, 1000); % Or whatever range you want
numerator = 2 * sqrt(pi * phi) .* cos(1./phi);
denominator = phi .^ (1/3) + phi .^2 + 1;
psi = numerator ./ denominator;
% Plot real part
subplot(2, 1, 1);
plot(phi, real(psi), 'b-')
grid on;
title('Real part of psi', 'FontSize', 20)
xlabel('phi', 'FontSize', 20)
ylabel('real(psi)', 'FontSize', 20)
% Plot imaginary part
subplot(2, 1, 2);
plot(phi, imag(psi), 'r-')
grid on;
title('Imaginary part of psi', 'FontSize', 20)
xlabel('phi', 'FontSize', 20)
ylabel('imag(psi)', 'FontSize', 20)
% Maximize the window.
g = gcf;
g.WindowState = 'maximized'
What is the context? Where did this formula come from? What does it describe?

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 7 de Nov. de 2020

Editada:

el 7 de Nov. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by