How can I write matrix with greek letters

 Accepted Answer

You can use latex to insert equations in the live editor. See here: https://www.mathworks.com/help/matlab/matlab_prog/insert-equations.html

11 Comments

Thanks for help. I used LaTeX equation to create a matrix with Greek letters and call it A. Now I need to find its inverse, my question is that how can I insert the matrix A in the command window in order it find its inverse?
If you want to do mathematical operations, you need a symbolic toolbox and write it as code instead of latex. For example, run the following code in the live editor
syms alpha beta gamma mu omega
A = [alpha beta^2 gamma*alpha;
mu gamma alpha;
omega^2 alpha^2 mu*alpha];
inv(A)
I used the code that you provided but the inverse with Greek letters interies become as follow:
the inverse of the matrix does not appear as symbol of Greek letters
Which MATLAB release are you using?
it is MATLAB R2020a
Can you paste the code you are typing in the live editor?
A=\matrix{\omega_F & \alpha & \cr -\omega_F & r_F+k_F+\delta_F }
This is the matrix I wrote using LaTeX equation.
sympref('TypesetOutput','default'); % at the beginning and try again with Ameer’s code
Arwa, not in latex mode. In the previous comment, I asked to run the following code in the live editor. You need to paste this as code
syms alpha beta gamma mu omega
A = [alpha beta^2 gamma*alpha;
mu gamma alpha;
omega^2 alpha^2 mu*alpha];
inv(A)
Now it works. Thank you very much Ameer.
I am glad to be of help!!!

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!