Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1494
Number of posts: 2174

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
MATLAB Prog to find 4 Values from 5 Equations Posted by rayshaumik on 1 Oct 2012 at 10:15 PM
Hi, I have a problem in MATLAB. I am doing research in Optics ... I have to find 4 values from 5 equations and having some trouble. Kindly help.

I have tried reg this as below: I would be grateful to have any suggestions. Thanks in advance.

clear

T = 0.89;
R = 0.11;
lamda = 0.98;
d = 1.65;
pi = 3.14;
phit = 0.6;
phir = 0.31;
%((-(a))*d) == (23.03)*k;

% sym a b n k; % a and b are "alpha" and "beta"

a = sym('a');
b = sym('b');
n = sym('n');
k = sym('k');

eq1 = T == '({(1-R)^2+4*R*(sin(phir))^2}*exp((-a)*d))/((1-R*exp((-a)*d))^2+4*R*exp((-a)*d)*(sin(b+phir))^2)';
eq2 = (phit) == '((2*(pi)*n*d)/lamda)-(atan((k(n^2+k^2-1))/((k^2+n^2)*(2+n)*n)))+(atan((R*exp((-a)*d))*(sin2(b+phir))/(1-R*exp((-a)*d)*cos2(b+phir))))';
eq3 = (phir) == 'atan(((-2)*k)/(1-((n)^2)-((k)^2)))';
eq4 = (b) == '((2*(pi)*n*d)/lamda)';
eq5 = (a) == '((4*(pi)*k)/lamda)';
%eq6 = (e) == '((-(a))*d) == (23.03)*k';

[a b n k] = solve(eq1,eq2,eq3,eq4,eq5,a,b,n,k);



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.