write a matrix in the form AX=RBX

% Write matrix of form AX=R*B*X with X contains A(k) and B(k) are eigenvectors
% conditions k = 1 to 10; n = 1 to k and n not equal to k
-(2+(pi*h/H)^2)*A(1)+A(2)-(h*R/2)*B(2) = 0
-(2+(pi*h/H)^2)*B(1)+B(2)+(h/2)*A(2)+(2*H*h/pi^2*xi)*symsum(n*(A(n+1)-A(n-1)),n,1,k and n not equal to k) = 0
for k =2:8
A(k-1)-(2+(k*h*pi/H)^2)*A(k)+A(k+1)-(h*R/2)*(B(k+1)-B(k-1)) = 0
B(k-1)-(2+(k*h*pi/H)^2)*B(k)+B(k+1)+(h/2)*(A(k+1)-A(k-1))+(2*H*h/pi^2*xi)*symsum(n*k*(A(n+1)-A(n-1)),n,1,k and n not equal to k) = 0
end
A(8)-(2+(9*h*pi/H)^2)*A(9)+(h*R/2)*B(8) = 0
B(8)-(2+(9*h*pi/H)^2)*B(9)-(h/2)*A(8)+(2*H*h/pi^2*xi)*symsum(9*n*(A(n+1)-A(n-1)),n,1,k and n not equal to k) = 0

4 Comments

It's not clear to me what you're trying to compute and what you already know. Your expressions include variables h, H, A, R, B, and xi (I think I got all of them.) Which of these are known quantities and which of them are you trying to compute? What are the known or desired sizes for these variables?
Thank you for response.
h, H and xi are known quantities.
R need to be computed.
My question is how to write the mentioned expression in the matrix form such that A(k) and B(k) (k runs from 1 to 10, n runs from 1 to k such that n is not equal to k) will be treated as eigenvectors for which eigenvalue R needs to be computed.
Hi Madhvi,
There is still some confusion regarding the problem that you are trying to solve. Based on the information provided, here is what I have understood:
  1. There is a matrix equation of the form: A*X = R*B*X.
  2. There are two variables to iterate, "n" and "k". "k" varies from 1 to 10 and "n" varies from 1 to k-1.
  3. Variables "h", "H", "A", "R", "B", and "xi" are known, and the goal is to compute the value of "R".
  4. There is a summation expression that you are attempting to code.
However, the code you provided is not clear or understandable. To assist you further, it would be helpful if you could provide a properly documented problem statement. Since the expression is not readable, kindly provide a documented (handwritten or typed) expression that you are trying to code.
Thank you for the response.
I need to write the following equation attached below in the matrix form in Matlab.

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 16 Oct 2023

Commented:

on 25 Oct 2023

Community Treasure Hunt

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

Start Hunting!