solve Ax=B matrix quick help!

okay so I need help with Ax=B code where A1,A3,A5,A7 is a constant number, X1,X3,X5,X7 is a variable, and alpha is a variable. i just switched it so it looks likes this AX=alpha clc clear all
AR = 6; b = 4; theta = [pi/8 pi/4 3*pi/8 pi/2];
A = 1; n = 1:2:8 ;
for i = 1:b alpha(i) = A*sin(n(i).*theta(1))*(1+(n(i).*pi/(2.*AR*sin(theta(1))))) i = i+1 end
for i = 1:b alpha2(i) = A*sin(n(i).*theta(2))*(1+(n(i).*pi/(2.*AR*sin(theta(2))))) i = i+1 end
for i = 1:b alpha3(i) = A*sin(n(i).*theta(3))*(1+(n(i).*pi/(2.*AR*sin(theta(3))))) i = i+1 end
for i = 1:b alpha4(i) = A*sin(n(i).*theta(4))*(1+(n(i).*pi/(2.*AR*sin(theta(4))))) i = i+1 end
y = [alpha' alpha2' alpha3' alpha4'];
syms X1 X3 X5 X7 alpha
A1 = y(1,:)'
A3 = y(2,:)';
A5 = y(3,:)';
A7 = y(4,:)';
A = [A1 A3 A5 A7]
X = [X1 X3 X5 X7]'
d = A(:,1)
e = A(:,2)
f = A(:,3)
g = A(:,4)
I need to solve system of 4 system of equation. I need to so where it become X1 = A1*alpha, X2 = A3*alpha, X3 = A5 * alpha, X4 = A7*alpha
here are the results.... A =
0.6445 2.8200 4.0841 2.2153
0.9689 1.4925 -2.0161 -2.5397
1.1857 -0.7080 -0.9249 2.7565
1.2618 -1.7854 2.3090 -2.8326
X = A1 A3 A5 A7
the answer should be like... X1 = .917alpha X2 = .1104alpha anyone help me real quick please?? its just solving system of equation but with 2 unknown variables and i cant seem to conquer it

Answers (0)

Asked:

on 3 Dec 2011

Community Treasure Hunt

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

Start Hunting!