How to Simulate magnitude of Mz in Gradient echo

3 visualizaciones (últimos 30 días)
Peter Phan
Peter Phan el 7 de En. de 2022
Respondida: Aditya el 22 de Dic. de 2023
Hi everyone,
I need to use Matlab to simulate the magnitude of Mz in gradient echo, through 256 RF excitations with flip angles of 10o, 30o, 50o, 70o, 90o, separately. When two tissues, gray matter (T1 = 1300 ms) and white matter (T1 = 900 ms), are imaged,
How can I plot their corresponding Mz versus number of RF excitations with TR of 90 ms?
Is there any suppored functions in Matlab to do that?
Great thanks

Respuestas (1)

Aditya
Aditya el 22 de Dic. de 2023
Hi Peter,
I understand that you want to calculate and plot the magnitude of Mz (the longitudinal magnetization) in a gradient echo sequence with multiple RF excitations. You can use the Bloch equations for this. MATLAB does not have a built-in function specifically for simulating gradient echo sequences, but you can write a script to perform the simulation using the equations.
Here's a basic template that you can use:
% Define the parameters
T1_gray = 1300; % T1 for gray matter in ms
T1_white = 900; % T1 for white matter in ms
TR = 90; % Repetition time in ms
flip_angles = [10, 30, 50, 70, 90]; % Flip angles in degrees
num_excitations = 256; % Number of RF excitations
% Pre-allocate arrays for Mz
Mz_gray = zeros(length(flip_angles), num_excitations);
Mz_white = zeros(length(flip_angles), num_excitations);
% Loop over each flip angle
for i = 1:length(flip_angles)
alpha = flip_angles(i) * pi / 180; % Convert flip angle to radians
% Calculate Mz for each excitation for gray matter
for n = 1:num_excitations
Mz_gray(i, n) = % write the correct equation
end
% Calculate Mz for each excitation for white matter
for n = 1:num_excitations
Mz_white(i, n) = % write the correct equation
end
% Plot Mz for gray matter
figure;
plot(1:num_excitations, Mz_gray(i, :), 'b', 'DisplayName', 'Gray Matter');
hold on;
% Plot Mz for white matter
plot(1:num_excitations, Mz_white(i, :), 'r', 'DisplayName', 'White Matter');
% Customize the plot
title(['Mz vs. Number of RF Excitations (Flip Angle = ', num2str(flip_angles(i)), '°)']);
xlabel('Number of RF Excitations');
ylabel('Mz');
legend('show');
hold off;
end
This script calculates the Mz values for both gray matter and white matter based on the provided equation. It then plots the results in separate figures for each flip angle, with the number of RF excitations on the x-axis and Mz on the y-axis.
Hope this helps!

Categorías

Más información sobre Communications Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by