Numerically solving an integral with multiple variables.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello. I am in dire need of help. I'm trying to numerically solve this integral, the Formula is on the third page (of the attached pdf) -- the F(1/2). I've tried different function handles but am coming up with nothing. Here are some things that I tried. I want Vg and Vd to be varying with this. Don't give me the whole answer but where can I even start? How do I start? I'm just unsure how to integrate at this point.
% INITIALIZE MATLAB
close all;
clc;
clear all;
syms x
syms Ro
syms Vd
syms Vg
syms CoRo %Constant of p
syms p
Vt = 0.7;
Vg = 2;
CoRo = 1.652e+16;
%Vg = 0:0.2:1.2;
% Ro
p = CoRo*(Vg-Vt);
% FUNCTIONS AND INTERVAL
a = @(Vd) 1+exp(Vd);
b = @(Vd)sqrt(a^2+4*exp(Vd)*(exp(p)-1));
u = @(Vd) log(b-(1+exp(Vd))-log(2));
f = @(u) sqrt(u)/(1+exp(u-x));
%a = inline(1+exp(Vd));
%b = inline('sqrt(a^2+4*exp(Vd)*(exp(p)-1))','Vd');
%u = inline('log(b-(1+exp(Vd))-log(2))','Vd');
%f = inline('sqrt(u)/(1+exp(u-x))','u');
d = integral(f,0,5)
% INTEGRAL
%Starting value
%s = 0;
%Ending value
%e = 5;
%F = integral(f,s,e);
% NUMBER OF POINTS
N = 10;
% INTEGRAL OF f
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!