Skip to Content
Electronic Circuits with MATLAB, PSpice, and Smith Chart
book

Electronic Circuits with MATLAB, PSpice, and Smith Chart

by Won Y. Yang, Jaekwon Kim, Kyung W. Park, Donghyun Baek, Sungjoon Lim, Jingon Joung, Suhyun Park, Han L. Lee, Woo June Choi, Taeho Im
January 2020
Intermediate to advanced
880 pages
21h 22m
English
Wiley
Content preview from Electronic Circuits with MATLAB, PSpice, and Smith Chart

Appendix DNonlinear/Differential Equations with MATLAB

D.1 Nonlinear Equation Solver <fsolve>

MATLAB has the built‐in function ‘fsolve(f,x0)’, which can give us a solution for a system of (nonlinear) equations. Suppose we have the following system of nonlinear equations to solve.

(D.1)equation

To solve this system of equations, we should rewrite as

(D.2)equation

and convert it into a MATLAB function defined in an M‐file, say, ‘f_d02.m’ as follows.

Then we type the following statements into the MATLAB Command Window.

>>x0=[0.8 0.2]; % Initial guess [0.8 0.2]
>>x=fsolve('f_d02',x0,optimset('fsolve')) % with default parameters
  x = 2.0000  0.5000

If you see some warning message with the MATLAB solution obtained by using ‘fsolve()’ like this, you can change the value(s) of the optional parameters such as

  • MaxFunEvals: Maximum number of function evaluations allowed
  • MaxIter: Maximum number of iterations allowed
  • TolFun: Termination tolerance on the function value
  • TolX: Termination tolerance on x

by using the MATLAB command ‘optimset( )’ as follows.

 options = optimset('param1',value1,'param2',value2,...)

For example, if you feel it contributive to better solution to set MaxFunEvals and TolX to 1000 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Discrete Systems and Digital Signal Processing with MATLAB, 2nd Edition

Discrete Systems and Digital Signal Processing with MATLAB, 2nd Edition

Taan S. ElAli
MATLAB For Dummies, 2nd Edition

MATLAB For Dummies, 2nd Edition

John Paul Mueller, Jim Sizemore

Publisher Resources

ISBN: 9781119598923Purchase book