Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is MathLab - C Programming Implement a function m-file named nonlinear_name.m that implements the system of two differential equations describing voltages v1 and v2

This is MathLab - C Programming

Implement a function m-file named nonlinear_name.m that implements the system of two differential equations describing voltages v1 and v2 in the nonlinear circuit example. Use the provided driver file nonlinear_solver.m to solve the system of differential equations and plot out the source voltage and voltages v1 and v2.

% % nonlinear_solver.m % % clear all close all

% Call the ODE stiff solver for tstart=0, tstop=300ns, I.C.s all zero [t, v] = ode15s(@nonlinear_circuit,[0 300e-9],[0;0],[]);

% Since the source voltage is defined within nonlinear_circuit.m, we need % to recreate it here so that we can plot it out. time = linspace(0,300e-9,300); source_freq = 10e6; % 10 MHz E = 2*sin(2*pi*source_freq*time);

subplot(311) plot(time*1e9,E) title('Nonlinear Circuit Simulation') ylabel('source voltage') subplot(312) plot(t*1e9,v(:,1)) ylabel('v(1)') subplot(313) plot(t*1e9,v(:,2)) ylabel('v(2)') xlabel('time [nanoseconds]')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions