如何將答案變成正常數值已回收

看板MATLAB作者 (YEN)時間15年前 (2008/10/27 14:24), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
程式碼: clc clear all syms x % c = acceptance angle , c1 = c' , c2 = theta 2, c4 = theta 2' % c3 = theta 3 , c5 = theta 3' % p = alpha angle , t = delta , w = zone width , % n = index , d = the distance from the axis to the edge of fresnel lens, % a = absorber edge % x = rayfuction at y = 0 d = 24.77; w = 5.91; y = 0; h = 55.87; n = 1.491; c = 2.5*pi/180; p = 33.8*pi/180; t = 3.77; x1 = -1/2*(2*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*t*cos(p)+sin(c)*w*cos(p)+2*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*sin(p)*d-2*sin(c)*d*cos(p))/(n*((n^2-1+cos(c)^2)/n^2)^(1/2)*sin(p)-sin(c)*cos(p)) ; y1 = 1/2*(2*h*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*sin(p)-2*h*sin(c)*cos(p)+2*t*sin(c)*cos(p)+sin(p)*sin(c)*w)/(n*((n^2-1+cos(c)^2)/n^2)^(1/2)*sin(p)-sin(c)*cos(p)) ; x2 = -1/2*(-2*t*sin(c)*cos(p)-n*((n^2-1+cos(c)^2)/n^2)^(1/2)*w*cos(p)-2*sin(p)*sin(c)*d+2*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*d*cos(p))/(-sin(c)*sin(p)+n*((n^2-1+cos(c)^2)/n^2)^(1/2)*cos(p)) ; y2 = -1/2*(2*h*sin(c)*sin(p)-2*h*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*cos(p)+2*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*t*cos(p)+sin(p)*n*((n^2-1+cos(c)^2)/n^2)^(1/2)*w)/(-sin(c)*sin(p)+n*((n^2-1+cos(c)^2)/n^2)^(1/2)*cos(p)) ; c = 2.5*pi/180; c1 = asin(sin(c)/n); c2 = p-c1; c4 = asin(n*sin(c2)); c3 = p+c1; c5 = asin(n*sin(c3)); eq7 = y-y1-(-tan(pi/2-(c4-p)))*(x-x1); % ray + of point (x1,y1) ray_plus = simplify(eq7) eq8 = y-y2-(-tan(pi/2-(c5-p)))*(x-x2); % ray - of point (x2,y2) ray_minus = simplify(eq8) [a] = solve(ray_plus,x) [b] = solve(ray_minus,x) -------------------------------- a = -22247418215160219370391799922277/1877819628762888626459438481408 b = 929627718978684068593603233795/323160192065229303829376270336 如何將a和b~~變成正常的數值!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.138.177.69 ※ 編輯: blackyen 來自: 140.138.177.69 (10/27 14:24)

10/27 16:42, , 1F
double(a),double(b)
10/27 16:42, 1F
文章代碼(AID): #191LwNbm (MATLAB)