سلام کسی میتونه خطای این کد رو بگیره:
ممنون
ممنون
کد:
% Model of memristor in MATLAB enviroment %---------------------------------------- function Memristor_Matlab Ron=100; Roff=16*(10^3); Rinit=11*(10^3); DR=Roff-Ron; tmin=0; tmax=3;% time interval N=500; % number of steps is N+1 OsaT=tmin:(tmax-tmin)/N:tmax; % time axis x0=(Roff-Rinit)/DR; %initial condition [t,x]=ode23t(@ODE_Memri_A,OsaT,x0);% calling ODE V=1*sin(2*pi*1*t); % input voltage I=V./(Roff-x*DR); % current %---- drawing the results--- figure(1); plot(V,I); title('I-V curve'); xlabel('V[volt]'); ylabel('I[amp]'); figure(2); plot(Flux,Charge); title('Flux-Charge curve'); xlabel('Flux'); ylabel('Charge'); %----intagration of U and I --- Flux=(t(2)-t(1))*filter(1,[1 -1],V); charge=(t(2)-t(1))*filter(1,[1 -1],I); %----ODE definition--- function dx=ODE_Memri_A(t,x) D=10e-9; Ron=100; Roff=16e3; DR=Roff-Ron; uv=1e-14; %dopant mobility k=(uv*Ron)/(D^2); p=10; %%% ODE definition V=sin(2*pi*t); % input voltage Fx=(1-(2*x-1)^(2*p)); dx=K*(V/(Roff-x*DR))*FX;
کد:
Error in ==> ode23t at 221 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ... Error in ==> Memristor_Matlab at 11 [t,x]=ode23t(@ODE_Memri_A,OsaT,x0);% calling ODE
دیدگاه