<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://brettczeto.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Brett</id>
	<title>CIWA - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://brettczeto.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Brett"/>
	<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php/Special:Contributions/Brett"/>
	<updated>2026-08-14T08:54:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=107</id>
		<title>Talk:Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=107"/>
		<updated>2026-08-12T03:48:29Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* yo */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== yo ==&lt;br /&gt;
&lt;br /&gt;
sup [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:47, 11 August 2026 (PDT)&lt;br /&gt;
&lt;br /&gt;
:nothing much [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:48, 11 August 2026 (PDT)&lt;br /&gt;
::that&#039;s cool. [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:48, 11 August 2026 (PDT)&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=106</id>
		<title>Talk:Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=106"/>
		<updated>2026-08-12T03:48:19Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* yo */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== yo ==&lt;br /&gt;
&lt;br /&gt;
sup [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:47, 11 August 2026 (PDT)&lt;br /&gt;
&lt;br /&gt;
:nothing much [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:48, 11 August 2026 (PDT)&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=105</id>
		<title>Talk:Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Talk:Czeto_Internal_Wiki_and_Archive&amp;diff=105"/>
		<updated>2026-08-12T03:47:56Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* yo */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== yo ==&lt;br /&gt;
&lt;br /&gt;
sup [[User:Brett|Brett]] ([[User talk:Brett|talk]]) 20:47, 11 August 2026 (PDT)&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=User:Brett&amp;diff=104</id>
		<title>User:Brett</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=User:Brett&amp;diff=104"/>
		<updated>2026-08-12T03:46:52Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The one and only.&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=User:Brett&amp;diff=103</id>
		<title>User:Brett</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=User:Brett&amp;diff=103"/>
		<updated>2026-08-12T03:45:42Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;IDK, I think it&amp;#039;s kinda cool&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IDK, I think it&#039;s kinda cool&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=102</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=102"/>
		<updated>2026-08-07T02:50:02Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mathematics ==&lt;br /&gt;
*[[Mathematical Literature Resources]] &lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [[Chemistry Literature Resources]]&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
* [[Organic Chemistry Lab Papers]]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
* [[Catalog of Electronic Blocks w/ Equations]] &lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;br /&gt;
* [[REBOUND Simulation and PC Benchmarking Tests]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=101</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=101"/>
		<updated>2026-08-07T02:49:18Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;Wiki et&#039;&#039;&#039; &#039;&#039;&#039;Archives Internes de Czeto&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Mathematics ==&lt;br /&gt;
*[[Mathematical Literature Resources]] &lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [[Chemistry Literature Resources]]&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
* [[Organic Chemistry Lab Papers]]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
* [[Catalog of Electronic Blocks w/ Equations]] &lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;br /&gt;
* [[REBOUND Simulation and PC Benchmarking Tests]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=CIWA:General_disclaimer&amp;diff=100</id>
		<title>CIWA:General disclaimer</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=CIWA:General_disclaimer&amp;diff=100"/>
		<updated>2026-08-07T02:37:35Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;English:&amp;#039;&amp;#039;&amp;#039;  Unless otherwise noted, original content on this site is licensed under CC BY-SA 4.0. Quoted material, excerpts, and citations remain the property of their original authors and are used here under fair use for commentary, reference, or educational purposes. Code snippets are licensed under [MIT/GPL-3.0] where indicated. This site is provided without warranty of accuracy or completeness; external links are provided for reference and are not endorsed.   &amp;#039;&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;English:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Unless otherwise noted, original content on this site is licensed under CC BY-SA 4.0. Quoted material, excerpts, and citations remain the property of their original authors and are used here under fair use for commentary, reference, or educational purposes. Code snippets are licensed under [MIT/GPL-3.0] where indicated. This site is provided without warranty of accuracy or completeness; external links are provided for reference and are not endorsed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Français:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sauf indication contraire, le contenu original de ce site est publié sous licence CC BY-SA 4.0. Les citations, extraits et références demeurent la propriété de leurs auteurs originaux et sont utilisés ici dans le cadre de l&#039;usage loyal (« fair use ») à des fins de commentaire, de référence ou d&#039;éducation. Les extraits de code sont sous licence [MIT/GPL-3.0] lorsque cela est indiqué. Ce site est fourni sans garantie d&#039;exactitude ou d&#039;exhaustivité ; les liens externes sont fournis à titre de référence et ne font l&#039;objet d&#039;aucun soutien ou approbation.&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=CIWA:Privacy_policy&amp;diff=99</id>
		<title>CIWA:Privacy policy</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=CIWA:Privacy_policy&amp;diff=99"/>
		<updated>2026-08-07T02:25:09Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;You may read or use any information on this site without providing any personal information of your own.  Inbound and internal traffic is not recorded or used by this sites owner in any form beyond what is technically necessary to facilitate use of HTTP, HTTPS, and other network protocols this site requires.  This site does not restrict traffic from V.P.N. providers or the T.O.R. network.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You may read or use any information on this site without providing any personal information of your own.&lt;br /&gt;
&lt;br /&gt;
Inbound and internal traffic is not recorded or used by this sites owner in any form beyond what is technically necessary to facilitate use of HTTP, HTTPS, and other network protocols this site requires.&lt;br /&gt;
&lt;br /&gt;
This site does not restrict traffic from V.P.N. providers or the T.O.R. network.&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Organic_Chemistry_Lab_Papers&amp;diff=98</id>
		<title>Organic Chemistry Lab Papers</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Organic_Chemistry_Lab_Papers&amp;diff=98"/>
		<updated>2026-08-07T02:05:10Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;placeholder text.  ideally i would have a db system for this, but ehhh&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;placeholder text.&lt;br /&gt;
&lt;br /&gt;
ideally i would have a db system for this, but ehhh&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Chemistry_Literature_Resources&amp;diff=97</id>
		<title>Chemistry Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Chemistry_Literature_Resources&amp;diff=97"/>
		<updated>2026-08-07T01:53:33Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow A.C.S. standards unless otherwise stated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
* Smith, J. G. Organic Chemistry, 5th ed.; McGraw-Hill Education: New York, 2017.&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Chemistry_Literature_Resources&amp;diff=96</id>
		<title>Chemistry Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Chemistry_Literature_Resources&amp;diff=96"/>
		<updated>2026-08-07T01:52:41Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;&amp;#039;&amp;#039;Note: Citations follow A.C.S. standards unless otherwise stated.&amp;#039;&amp;#039;&amp;#039;&amp;#039;  == Books == * Smith, J. G. Organic Chemistry, 5th ed.; McGraw-Hill Education: New York, 2017.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow A.C.S. standards unless otherwise stated.&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
* Smith, J. G. Organic Chemistry, 5th ed.; McGraw-Hill Education: New York, 2017.&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=95</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=95"/>
		<updated>2026-08-06T22:30:11Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
=== Abstract: ===&lt;br /&gt;
&#039;&#039;&#039;Project Github&#039;&#039;&#039;: https://github.com/0xVRGL/GalaxySim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;REBOUND Website&#039;&#039;&#039;: https://rebound.hanno-rein.de/&lt;br /&gt;
&lt;br /&gt;
REBOUND is an N-Body integrator used to mathematically and computationally model the movement of particles under the influence of gravity. &lt;br /&gt;
&lt;br /&gt;
As all objects with mass will exert a gravitational pull, an absolute model of a solar system must account for all objects of mass regardless if their gravitational pull relatively small. For example, it is usually sufficient to only calculate the gravitational influence of the Sun when constructing a model of the solar system, but as each planet itself has mass, the planets too exert a gravitational force on the sun, thus pulling the sun off its own axis ever so slightly.   &lt;br /&gt;
&lt;br /&gt;
As a larger number of particles are added to the simulation, the number of gravitational interactions -and requisite equations needed- grow O(N²), resulting in ever inevitably computational times.&lt;br /&gt;
&lt;br /&gt;
Henceforth the idea to use such as a PC benchmarking test, albeit a rudimentary one.&lt;br /&gt;
&lt;br /&gt;
=== Rebound Simulation Code: ===&lt;br /&gt;
REBOUND&#039;s base code is written in C, whereas this project is written in C++ and compiled through Microsoft&#039;s vscode compiler. &lt;br /&gt;
&lt;br /&gt;
As a result &#039;&#039;restrict&#039;&#039; header tags must be redefined to &#039;&#039;__restrict&#039;&#039; -as for rebounds library be understood by the compiler-, and &#039;&#039;_USE_MATH_DEFINES&#039;&#039;, must be defined before the C&#039;s main library is allowed to run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;#define _USE_MATH_DEFINES&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define restrict __restrict&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#include &amp;quot;rebound.h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
#undef restrict&lt;br /&gt;
&lt;br /&gt;
class TimeLogger {&lt;br /&gt;
    public:&lt;br /&gt;
        time_t simstart;&lt;br /&gt;
        time_t simend;&lt;br /&gt;
        time_t simdiff;&lt;br /&gt;
&lt;br /&gt;
        int N;&lt;br /&gt;
&lt;br /&gt;
        void SetSimStartTime() {&lt;br /&gt;
            time(&amp;amp;simstart);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void SetSimEndTime() {&lt;br /&gt;
            time(&amp;amp;simend);&lt;br /&gt;
&lt;br /&gt;
            simdiff = simend - simstart;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void WriteTimeToFile() {&lt;br /&gt;
            FILE *fptimelog;&lt;br /&gt;
            char fname[64];&lt;br /&gt;
&lt;br /&gt;
            snprintf(fname, sizeof(fname),&amp;quot;%d_Particle_RSim_Log.txt&amp;quot;, N);&lt;br /&gt;
            FILE *fp_log = fopen(fname, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)simstart);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)simend);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Diff: %ld\n&amp;quot;, (long)simdiff);&lt;br /&gt;
&lt;br /&gt;
            fclose(fp_log);&lt;br /&gt;
        }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void heartbeat(struct reb_simulation* rsim) {&lt;br /&gt;
    if (reb_simulation_output_check(rsim, 1.0)){&lt;br /&gt;
        //Built-in progress line: N_tot, t, dt, cpu time, and % of tmax done&lt;br /&gt;
        reb_simulation_output_timing(rsim, 100.0);&lt;br /&gt;
&lt;br /&gt;
        //printf(&amp;quot;%f &amp;quot;, rsim-&amp;gt;particles[2].ax);&lt;br /&gt;
        //printf(&amp;quot;%f\n&amp;quot;, rsim-&amp;gt;particles[2].ay);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
    int N;&lt;br /&gt;
&lt;br /&gt;
    TimeLogger timelogger{};&lt;br /&gt;
&lt;br /&gt;
    struct reb_simulation* rsim = reb_simulation_create();&lt;br /&gt;
    reb_simulation_set_integrator(rsim, &amp;quot;whfast&amp;quot;);&lt;br /&gt;
    rsim-&amp;gt;heartbeat = &amp;amp;heartbeat;&lt;br /&gt;
&lt;br /&gt;
    //Central Mass Particle.&lt;br /&gt;
    struct reb_particle central = {0};&lt;br /&gt;
    central.m = 1.0;    //I&#039;m assuming this is Solar Mass Units.&lt;br /&gt;
    reb_simulation_add(rsim, central);&lt;br /&gt;
&lt;br /&gt;
    //Orbiting Massless Paricles&lt;br /&gt;
    printf(&amp;quot;Awaiting Input:&amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;, &amp;amp;N);&lt;br /&gt;
    timelogger.N = N;&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
        double a = reb_random_uniform(rsim, 0.4,20.);&lt;br /&gt;
        double e = reb_random_uniform(rsim, 0.01,0.2);&lt;br /&gt;
        double omega = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
        double f = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
&lt;br /&gt;
        struct reb_particle p = reb_particle_from_orbit(1.,rsim-&amp;gt;particles[0],0.,a,e,0.,0.,omega,f);&lt;br /&gt;
        reb_simulation_add(rsim, p);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Adding particle %d\n&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimStartTime();&lt;br /&gt;
&lt;br /&gt;
    //Sim Integration for 100s: dt=0.01s thus 10000 steps&lt;br /&gt;
    reb_simulation_integrate(rsim, 100);&lt;br /&gt;
    reb_simulation_move_to_com(rsim);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimEndTime();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;Writing Time Info to Log&amp;quot;);&lt;br /&gt;
    timelogger.WriteTimeToFile();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)timelogger.simstart);&lt;br /&gt;
    printf(&amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)timelogger.simend);&lt;br /&gt;
    printf(&amp;quot;Total Time: %lld\n\n&amp;quot;, timelogger.simdiff);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_output_orbits(rsim, &amp;quot;output&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_free(rsim);&lt;br /&gt;
&lt;br /&gt;
    system(&amp;quot;pause&amp;quot;);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMakeLists: ===&lt;br /&gt;
This project uses the rebound library as compiled from source in IntellaJ CLion rather than as provided by rebound&#039;s github, as CLion uses CMakeLists instead of Make, new compilation files had to be written.&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/src/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(rebound C)&lt;br /&gt;
&lt;br /&gt;
set(SOURCES rebound.c&lt;br /&gt;
        tree.c&lt;br /&gt;
        particle.c&lt;br /&gt;
        gravity.c&lt;br /&gt;
        integrator_whfast.c&lt;br /&gt;
        integrator_whfast512.c&lt;br /&gt;
        integrator_saba.c&lt;br /&gt;
        integrator_ias15.c&lt;br /&gt;
        integrator_sei.c&lt;br /&gt;
        integrator_bs.c&lt;br /&gt;
        integrator_leapfrog.c&lt;br /&gt;
        integrator_mercurius.c&lt;br /&gt;
        integrator_trace.c&lt;br /&gt;
        integrator_eos.c&lt;br /&gt;
        boundary.c&lt;br /&gt;
        binarydata.c&lt;br /&gt;
        output.c&lt;br /&gt;
        collision.c&lt;br /&gt;
        communication_mpi.c&lt;br /&gt;
        display.c&lt;br /&gt;
        tools.c&lt;br /&gt;
        rotations.c&lt;br /&gt;
        simulation.c&lt;br /&gt;
        derivatives.c&lt;br /&gt;
        simulationarchive.c&lt;br /&gt;
        glad.c&lt;br /&gt;
        integrator_janus.c&lt;br /&gt;
        transformations.c&lt;br /&gt;
        fmemopen.c&lt;br /&gt;
        server.c&lt;br /&gt;
        frequency_analysis.c)&lt;br /&gt;
&lt;br /&gt;
#object file build target.&lt;br /&gt;
add_library(rebound OBJECT ${SOURCES})&lt;br /&gt;
target_compile_definitions(rebound PRIVATE BUILDINGLIBREBOUND _GNU_SOURCE)&lt;br /&gt;
&lt;br /&gt;
#dll file build target.&lt;br /&gt;
add_library(librebound SHARED $&amp;lt;TARGET_OBJECTS:rebound&amp;gt;)&lt;br /&gt;
target_include_directories(librebound PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
target_compile_definitions(librebound PRIVATE _USRDLL _WINDLL)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(GalaxySim)&lt;br /&gt;
&lt;br /&gt;
add_subdirectory(${PROJECT_SOURCE_DIR}/src)&lt;br /&gt;
&lt;br /&gt;
add_executable(GalaxySim GalaxySim.cpp)&lt;br /&gt;
target_link_libraries(GalaxySim PRIVATE librebound)&lt;br /&gt;
#again, have to manually copy over .dll so the exe works.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benchmark Testing and Results: ===&lt;br /&gt;
Initial benchmark tests returned results consistent with an exponential rise in computing time, quadratic regression was then used to a curve fit, as provided by MATLAB&#039;s &#039;&#039;polyfit&#039;&#039; and &#039;&#039;polyval&#039;&#039; functions.&lt;br /&gt;
&lt;br /&gt;
The program was then run on a friend&#039;s considerably more powerful PC and results were compared.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
|[[File:GalaxySimFinalResults.png|thumb|700x700px]]&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Amount&lt;br /&gt;
!UNIX Time Start&lt;br /&gt;
!UNIX Time End&lt;br /&gt;
!Total Time (s)&lt;br /&gt;
!&lt;br /&gt;
!Amount&lt;br /&gt;
!Est Time (s)&lt;br /&gt;
|-&lt;br /&gt;
|50p&lt;br /&gt;
|1784779993&lt;br /&gt;
|1784779999&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|10,000p&lt;br /&gt;
|120429 (1.39 days)&lt;br /&gt;
|-&lt;br /&gt;
|100p&lt;br /&gt;
|1784780020&lt;br /&gt;
|1784780037&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|100,000p&lt;br /&gt;
|12004281 (4.56 months)&lt;br /&gt;
|-&lt;br /&gt;
|150p&lt;br /&gt;
|1784840470&lt;br /&gt;
|1784840504&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|1,000,000p&lt;br /&gt;
|1200042801 (38 yrs)&lt;br /&gt;
|-&lt;br /&gt;
|200p&lt;br /&gt;
|1784840585&lt;br /&gt;
|1784840643&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|250p&lt;br /&gt;
|1784840800&lt;br /&gt;
|1784840888&lt;br /&gt;
|88&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|300p&lt;br /&gt;
|1784840917&lt;br /&gt;
|1784841040&lt;br /&gt;
|123&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|350p&lt;br /&gt;
|1784853451&lt;br /&gt;
|1784853612&lt;br /&gt;
|161&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|400p&lt;br /&gt;
|1784853102&lt;br /&gt;
|1784853310&lt;br /&gt;
|208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|450p&lt;br /&gt;
|1784852796&lt;br /&gt;
|1784853057&lt;br /&gt;
|261&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|500p&lt;br /&gt;
|1784780056&lt;br /&gt;
|1784780380&lt;br /&gt;
|324&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|550p&lt;br /&gt;
|1784852388&lt;br /&gt;
|1784852773&lt;br /&gt;
|385&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|600p&lt;br /&gt;
|1784851882&lt;br /&gt;
|1784852335&lt;br /&gt;
|453&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|650p&lt;br /&gt;
|1784851333&lt;br /&gt;
|1784851862&lt;br /&gt;
|529&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|700p&lt;br /&gt;
|1784850690&lt;br /&gt;
|1784851298&lt;br /&gt;
|608&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|750p&lt;br /&gt;
|1784849967&lt;br /&gt;
|1784850660&lt;br /&gt;
|693&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|800p&lt;br /&gt;
|1784849060&lt;br /&gt;
|1784849858&lt;br /&gt;
|798&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|850p&lt;br /&gt;
|1784847886&lt;br /&gt;
|1784848777&lt;br /&gt;
|891&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|900p&lt;br /&gt;
|1784842807&lt;br /&gt;
|1784843812&lt;br /&gt;
|1005&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|950p&lt;br /&gt;
|1784841104&lt;br /&gt;
|1784842246&lt;br /&gt;
|1142&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|1000p&lt;br /&gt;
|1784782477&lt;br /&gt;
|1784783685&lt;br /&gt;
|1208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2000p&lt;br /&gt;
|1784834623&lt;br /&gt;
|1784839457&lt;br /&gt;
|4834&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Blue Line&#039;&#039;&#039;: My PC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Orange Line&#039;&#039;&#039;: Friends PC&lt;br /&gt;
&lt;br /&gt;
Data within table collected from my PC, see matlab code below for friends data.&lt;br /&gt;
&lt;br /&gt;
==== Matlab Quadratic Regression Code: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
x_dat_b = [0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,2000];&lt;br /&gt;
y_dat_b = [0,6,17,34,58,88,123,161,208,261,324,385,453,529,608,693,798,891,1005,1142,1208,4834];&lt;br /&gt;
&lt;br /&gt;
x_dat_j = [0, 100, 200, 300, 500, 700];&lt;br /&gt;
y_dat_j = [0, 11, 27, 60, 144, 288];&lt;br /&gt;
&lt;br /&gt;
x_dat_jo = [0,100,200,300,2000];&lt;br /&gt;
y_dat_jo = [0,8,26,54,2105];&lt;br /&gt;
&lt;br /&gt;
coeffs = polyfit(x_dat_jo,y_dat_jo,2);&lt;br /&gt;
&lt;br /&gt;
yvect = polyval(coeffs, x_dat_jo);&lt;br /&gt;
&lt;br /&gt;
sse = sum((y_dat_jo-yvect).^2);&lt;br /&gt;
sst = sum((y_dat_jo-mean(y_dat_jo)).^2);&lt;br /&gt;
&lt;br /&gt;
r2 = 1 - sse/sst;&lt;br /&gt;
&lt;br /&gt;
x_fun_b = 0:0.01:2500;&lt;br /&gt;
y_fun_b = 0.0012*x_fun_b.^2+0.0428*x_fun_b+1.3282;&lt;br /&gt;
&lt;br /&gt;
x_fun_j = 0:0.01:2500;&lt;br /&gt;
y_fun_j = 0.00055945*x_fun_j.^2+0.0142*x_fun_j+2.0172;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_b,y_fun_b);&lt;br /&gt;
xlabel(&#039;# of Particles&#039;);&lt;br /&gt;
ylabel(&#039;Time (s)&#039;);&lt;br /&gt;
hold on;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_j,y_fun_j);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_b,y_dat_b, &#039;blax&#039;);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_j,y_dat_j, &#039;x&#039;, &#039;Color&#039;, &#039;#47c4ed&#039;);&lt;br /&gt;
&lt;br /&gt;
hold off;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=94</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=94"/>
		<updated>2026-08-06T22:28:57Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Project Github&#039;&#039;&#039;: https://github.com/0xVRGL/GalaxySim&lt;br /&gt;
&lt;br /&gt;
=== Abstract: ===&lt;br /&gt;
Main Website: https://rebound.hanno-rein.de/&lt;br /&gt;
&lt;br /&gt;
REBOUND is an N-Body integrator used to mathematically and computationally model the movement of particles under the influence of gravity. &lt;br /&gt;
&lt;br /&gt;
As all objects with mass will exert a gravitational pull, an absolute model of a solar system must account for all objects of mass regardless if their gravitational pull relatively small. For example, it is usually sufficient to only calculate the gravitational influence of the Sun when constructing a model of the solar system, but as each planet itself has mass, the planets too exert a gravitational force on the sun, thus pulling the sun off its own axis ever so slightly.   &lt;br /&gt;
&lt;br /&gt;
As a larger number of particles are added to the simulation, the number of gravitational interactions -and requisite equations needed- grow O(N²), resulting in ever inevitably computational times.&lt;br /&gt;
&lt;br /&gt;
Henceforth the idea to use such as a PC benchmarking test, albeit a rudimentary one.&lt;br /&gt;
&lt;br /&gt;
=== Rebound Simulation Code: ===&lt;br /&gt;
REBOUND&#039;s base code is written in C, whereas this project is written in C++ and compiled through Microsoft&#039;s vscode compiler. &lt;br /&gt;
&lt;br /&gt;
As a result &#039;&#039;restrict&#039;&#039; header tags must be redefined to &#039;&#039;__restrict&#039;&#039; -as for rebounds library be understood by the compiler-, and &#039;&#039;_USE_MATH_DEFINES&#039;&#039;, must be defined before the C&#039;s main library is allowed to run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;#define _USE_MATH_DEFINES&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define restrict __restrict&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#include &amp;quot;rebound.h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
#undef restrict&lt;br /&gt;
&lt;br /&gt;
class TimeLogger {&lt;br /&gt;
    public:&lt;br /&gt;
        time_t simstart;&lt;br /&gt;
        time_t simend;&lt;br /&gt;
        time_t simdiff;&lt;br /&gt;
&lt;br /&gt;
        int N;&lt;br /&gt;
&lt;br /&gt;
        void SetSimStartTime() {&lt;br /&gt;
            time(&amp;amp;simstart);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void SetSimEndTime() {&lt;br /&gt;
            time(&amp;amp;simend);&lt;br /&gt;
&lt;br /&gt;
            simdiff = simend - simstart;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void WriteTimeToFile() {&lt;br /&gt;
            FILE *fptimelog;&lt;br /&gt;
            char fname[64];&lt;br /&gt;
&lt;br /&gt;
            snprintf(fname, sizeof(fname),&amp;quot;%d_Particle_RSim_Log.txt&amp;quot;, N);&lt;br /&gt;
            FILE *fp_log = fopen(fname, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)simstart);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)simend);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Diff: %ld\n&amp;quot;, (long)simdiff);&lt;br /&gt;
&lt;br /&gt;
            fclose(fp_log);&lt;br /&gt;
        }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void heartbeat(struct reb_simulation* rsim) {&lt;br /&gt;
    if (reb_simulation_output_check(rsim, 1.0)){&lt;br /&gt;
        //Built-in progress line: N_tot, t, dt, cpu time, and % of tmax done&lt;br /&gt;
        reb_simulation_output_timing(rsim, 100.0);&lt;br /&gt;
&lt;br /&gt;
        //printf(&amp;quot;%f &amp;quot;, rsim-&amp;gt;particles[2].ax);&lt;br /&gt;
        //printf(&amp;quot;%f\n&amp;quot;, rsim-&amp;gt;particles[2].ay);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
    int N;&lt;br /&gt;
&lt;br /&gt;
    TimeLogger timelogger{};&lt;br /&gt;
&lt;br /&gt;
    struct reb_simulation* rsim = reb_simulation_create();&lt;br /&gt;
    reb_simulation_set_integrator(rsim, &amp;quot;whfast&amp;quot;);&lt;br /&gt;
    rsim-&amp;gt;heartbeat = &amp;amp;heartbeat;&lt;br /&gt;
&lt;br /&gt;
    //Central Mass Particle.&lt;br /&gt;
    struct reb_particle central = {0};&lt;br /&gt;
    central.m = 1.0;    //I&#039;m assuming this is Solar Mass Units.&lt;br /&gt;
    reb_simulation_add(rsim, central);&lt;br /&gt;
&lt;br /&gt;
    //Orbiting Massless Paricles&lt;br /&gt;
    printf(&amp;quot;Awaiting Input:&amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;, &amp;amp;N);&lt;br /&gt;
    timelogger.N = N;&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
        double a = reb_random_uniform(rsim, 0.4,20.);&lt;br /&gt;
        double e = reb_random_uniform(rsim, 0.01,0.2);&lt;br /&gt;
        double omega = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
        double f = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
&lt;br /&gt;
        struct reb_particle p = reb_particle_from_orbit(1.,rsim-&amp;gt;particles[0],0.,a,e,0.,0.,omega,f);&lt;br /&gt;
        reb_simulation_add(rsim, p);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Adding particle %d\n&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimStartTime();&lt;br /&gt;
&lt;br /&gt;
    //Sim Integration for 100s: dt=0.01s thus 10000 steps&lt;br /&gt;
    reb_simulation_integrate(rsim, 100);&lt;br /&gt;
    reb_simulation_move_to_com(rsim);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimEndTime();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;Writing Time Info to Log&amp;quot;);&lt;br /&gt;
    timelogger.WriteTimeToFile();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)timelogger.simstart);&lt;br /&gt;
    printf(&amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)timelogger.simend);&lt;br /&gt;
    printf(&amp;quot;Total Time: %lld\n\n&amp;quot;, timelogger.simdiff);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_output_orbits(rsim, &amp;quot;output&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_free(rsim);&lt;br /&gt;
&lt;br /&gt;
    system(&amp;quot;pause&amp;quot;);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMakeLists: ===&lt;br /&gt;
This project uses the rebound library as compiled from source in IntellaJ CLion rather than as provided by rebound&#039;s github, as CLion uses CMakeLists instead of Make, new compilation files had to be written.&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/src/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(rebound C)&lt;br /&gt;
&lt;br /&gt;
set(SOURCES rebound.c&lt;br /&gt;
        tree.c&lt;br /&gt;
        particle.c&lt;br /&gt;
        gravity.c&lt;br /&gt;
        integrator_whfast.c&lt;br /&gt;
        integrator_whfast512.c&lt;br /&gt;
        integrator_saba.c&lt;br /&gt;
        integrator_ias15.c&lt;br /&gt;
        integrator_sei.c&lt;br /&gt;
        integrator_bs.c&lt;br /&gt;
        integrator_leapfrog.c&lt;br /&gt;
        integrator_mercurius.c&lt;br /&gt;
        integrator_trace.c&lt;br /&gt;
        integrator_eos.c&lt;br /&gt;
        boundary.c&lt;br /&gt;
        binarydata.c&lt;br /&gt;
        output.c&lt;br /&gt;
        collision.c&lt;br /&gt;
        communication_mpi.c&lt;br /&gt;
        display.c&lt;br /&gt;
        tools.c&lt;br /&gt;
        rotations.c&lt;br /&gt;
        simulation.c&lt;br /&gt;
        derivatives.c&lt;br /&gt;
        simulationarchive.c&lt;br /&gt;
        glad.c&lt;br /&gt;
        integrator_janus.c&lt;br /&gt;
        transformations.c&lt;br /&gt;
        fmemopen.c&lt;br /&gt;
        server.c&lt;br /&gt;
        frequency_analysis.c)&lt;br /&gt;
&lt;br /&gt;
#object file build target.&lt;br /&gt;
add_library(rebound OBJECT ${SOURCES})&lt;br /&gt;
target_compile_definitions(rebound PRIVATE BUILDINGLIBREBOUND _GNU_SOURCE)&lt;br /&gt;
&lt;br /&gt;
#dll file build target.&lt;br /&gt;
add_library(librebound SHARED $&amp;lt;TARGET_OBJECTS:rebound&amp;gt;)&lt;br /&gt;
target_include_directories(librebound PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
target_compile_definitions(librebound PRIVATE _USRDLL _WINDLL)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(GalaxySim)&lt;br /&gt;
&lt;br /&gt;
add_subdirectory(${PROJECT_SOURCE_DIR}/src)&lt;br /&gt;
&lt;br /&gt;
add_executable(GalaxySim GalaxySim.cpp)&lt;br /&gt;
target_link_libraries(GalaxySim PRIVATE librebound)&lt;br /&gt;
#again, have to manually copy over .dll so the exe works.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benchmark Testing and Results: ===&lt;br /&gt;
Initial benchmark tests returned results consistent with an exponential rise in computing time, quadratic regression was then used to a curve fit, as provided by MATLAB&#039;s &#039;&#039;polyfit&#039;&#039; and &#039;&#039;polyval&#039;&#039; functions.&lt;br /&gt;
&lt;br /&gt;
The program was then run on a friend&#039;s considerably more powerful PC and results were compared.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
|[[File:GalaxySimFinalResults.png|thumb|700x700px]]&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Amount&lt;br /&gt;
!UNIX Time Start&lt;br /&gt;
!UNIX Time End&lt;br /&gt;
!Total Time (s)&lt;br /&gt;
!&lt;br /&gt;
!Amount&lt;br /&gt;
!Est Time (s)&lt;br /&gt;
|-&lt;br /&gt;
|50p&lt;br /&gt;
|1784779993&lt;br /&gt;
|1784779999&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|10,000p&lt;br /&gt;
|120429 (1.39 days)&lt;br /&gt;
|-&lt;br /&gt;
|100p&lt;br /&gt;
|1784780020&lt;br /&gt;
|1784780037&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|100,000p&lt;br /&gt;
|12004281 (4.56 months)&lt;br /&gt;
|-&lt;br /&gt;
|150p&lt;br /&gt;
|1784840470&lt;br /&gt;
|1784840504&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|1,000,000p&lt;br /&gt;
|1200042801 (38 yrs)&lt;br /&gt;
|-&lt;br /&gt;
|200p&lt;br /&gt;
|1784840585&lt;br /&gt;
|1784840643&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|250p&lt;br /&gt;
|1784840800&lt;br /&gt;
|1784840888&lt;br /&gt;
|88&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|300p&lt;br /&gt;
|1784840917&lt;br /&gt;
|1784841040&lt;br /&gt;
|123&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|350p&lt;br /&gt;
|1784853451&lt;br /&gt;
|1784853612&lt;br /&gt;
|161&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|400p&lt;br /&gt;
|1784853102&lt;br /&gt;
|1784853310&lt;br /&gt;
|208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|450p&lt;br /&gt;
|1784852796&lt;br /&gt;
|1784853057&lt;br /&gt;
|261&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|500p&lt;br /&gt;
|1784780056&lt;br /&gt;
|1784780380&lt;br /&gt;
|324&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|550p&lt;br /&gt;
|1784852388&lt;br /&gt;
|1784852773&lt;br /&gt;
|385&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|600p&lt;br /&gt;
|1784851882&lt;br /&gt;
|1784852335&lt;br /&gt;
|453&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|650p&lt;br /&gt;
|1784851333&lt;br /&gt;
|1784851862&lt;br /&gt;
|529&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|700p&lt;br /&gt;
|1784850690&lt;br /&gt;
|1784851298&lt;br /&gt;
|608&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|750p&lt;br /&gt;
|1784849967&lt;br /&gt;
|1784850660&lt;br /&gt;
|693&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|800p&lt;br /&gt;
|1784849060&lt;br /&gt;
|1784849858&lt;br /&gt;
|798&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|850p&lt;br /&gt;
|1784847886&lt;br /&gt;
|1784848777&lt;br /&gt;
|891&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|900p&lt;br /&gt;
|1784842807&lt;br /&gt;
|1784843812&lt;br /&gt;
|1005&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|950p&lt;br /&gt;
|1784841104&lt;br /&gt;
|1784842246&lt;br /&gt;
|1142&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|1000p&lt;br /&gt;
|1784782477&lt;br /&gt;
|1784783685&lt;br /&gt;
|1208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2000p&lt;br /&gt;
|1784834623&lt;br /&gt;
|1784839457&lt;br /&gt;
|4834&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Blue Line&#039;&#039;&#039;: My PC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Orange Line&#039;&#039;&#039;: Friends PC&lt;br /&gt;
&lt;br /&gt;
Data within table collected from my PC, see matlab code below for friends data.&lt;br /&gt;
&lt;br /&gt;
==== Matlab Quadratic Regression Code: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
x_dat_b = [0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,2000];&lt;br /&gt;
y_dat_b = [0,6,17,34,58,88,123,161,208,261,324,385,453,529,608,693,798,891,1005,1142,1208,4834];&lt;br /&gt;
&lt;br /&gt;
x_dat_j = [0, 100, 200, 300, 500, 700];&lt;br /&gt;
y_dat_j = [0, 11, 27, 60, 144, 288];&lt;br /&gt;
&lt;br /&gt;
x_dat_jo = [0,100,200,300,2000];&lt;br /&gt;
y_dat_jo = [0,8,26,54,2105];&lt;br /&gt;
&lt;br /&gt;
coeffs = polyfit(x_dat_jo,y_dat_jo,2);&lt;br /&gt;
&lt;br /&gt;
yvect = polyval(coeffs, x_dat_jo);&lt;br /&gt;
&lt;br /&gt;
sse = sum((y_dat_jo-yvect).^2);&lt;br /&gt;
sst = sum((y_dat_jo-mean(y_dat_jo)).^2);&lt;br /&gt;
&lt;br /&gt;
r2 = 1 - sse/sst;&lt;br /&gt;
&lt;br /&gt;
x_fun_b = 0:0.01:2500;&lt;br /&gt;
y_fun_b = 0.0012*x_fun_b.^2+0.0428*x_fun_b+1.3282;&lt;br /&gt;
&lt;br /&gt;
x_fun_j = 0:0.01:2500;&lt;br /&gt;
y_fun_j = 0.00055945*x_fun_j.^2+0.0142*x_fun_j+2.0172;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_b,y_fun_b);&lt;br /&gt;
xlabel(&#039;# of Particles&#039;);&lt;br /&gt;
ylabel(&#039;Time (s)&#039;);&lt;br /&gt;
hold on;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_j,y_fun_j);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_b,y_dat_b, &#039;blax&#039;);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_j,y_dat_j, &#039;x&#039;, &#039;Color&#039;, &#039;#47c4ed&#039;);&lt;br /&gt;
&lt;br /&gt;
hold off;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=93</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=93"/>
		<updated>2026-08-06T22:26:39Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* Benchmark Testing and Results: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
=== Abstract: ===&lt;br /&gt;
Main Website: https://rebound.hanno-rein.de/&lt;br /&gt;
&lt;br /&gt;
REBOUND is an N-Body integrator used to mathematically and computationally model the movement of particles under the influence of gravity. &lt;br /&gt;
&lt;br /&gt;
As all objects with mass will exert a gravitational pull, an absolute model of a solar system must account for all objects of mass regardless if their gravitational pull relatively small. For example, it is usually sufficient to only calculate the gravitational influence of the Sun when constructing a model of the solar system, but as each planet itself has mass, the planets too exert a gravitational force on the sun, thus pulling the sun off its own axis ever so slightly.   &lt;br /&gt;
&lt;br /&gt;
As a larger number of particles are added to the simulation, the number of gravitational interactions -and requisite equations needed- grow O(N²), resulting in ever inevitably computational times.&lt;br /&gt;
&lt;br /&gt;
Henceforth the idea to use such as a PC benchmarking test, albeit a rudimentary one.&lt;br /&gt;
&lt;br /&gt;
=== Rebound Simulation Code: ===&lt;br /&gt;
REBOUND&#039;s base code is written in C, whereas this project is written in C++ and compiled through Microsoft&#039;s vscode compiler. &lt;br /&gt;
&lt;br /&gt;
As a result &#039;&#039;restrict&#039;&#039; header tags must be redefined to &#039;&#039;__restrict&#039;&#039; -as for rebounds library be understood by the compiler-, and &#039;&#039;_USE_MATH_DEFINES&#039;&#039;, must be defined before the C&#039;s main library is allowed to run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;#define _USE_MATH_DEFINES&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define restrict __restrict&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#include &amp;quot;rebound.h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
#undef restrict&lt;br /&gt;
&lt;br /&gt;
class TimeLogger {&lt;br /&gt;
    public:&lt;br /&gt;
        time_t simstart;&lt;br /&gt;
        time_t simend;&lt;br /&gt;
        time_t simdiff;&lt;br /&gt;
&lt;br /&gt;
        int N;&lt;br /&gt;
&lt;br /&gt;
        void SetSimStartTime() {&lt;br /&gt;
            time(&amp;amp;simstart);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void SetSimEndTime() {&lt;br /&gt;
            time(&amp;amp;simend);&lt;br /&gt;
&lt;br /&gt;
            simdiff = simend - simstart;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void WriteTimeToFile() {&lt;br /&gt;
            FILE *fptimelog;&lt;br /&gt;
            char fname[64];&lt;br /&gt;
&lt;br /&gt;
            snprintf(fname, sizeof(fname),&amp;quot;%d_Particle_RSim_Log.txt&amp;quot;, N);&lt;br /&gt;
            FILE *fp_log = fopen(fname, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)simstart);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)simend);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Diff: %ld\n&amp;quot;, (long)simdiff);&lt;br /&gt;
&lt;br /&gt;
            fclose(fp_log);&lt;br /&gt;
        }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void heartbeat(struct reb_simulation* rsim) {&lt;br /&gt;
    if (reb_simulation_output_check(rsim, 1.0)){&lt;br /&gt;
        //Built-in progress line: N_tot, t, dt, cpu time, and % of tmax done&lt;br /&gt;
        reb_simulation_output_timing(rsim, 100.0);&lt;br /&gt;
&lt;br /&gt;
        //printf(&amp;quot;%f &amp;quot;, rsim-&amp;gt;particles[2].ax);&lt;br /&gt;
        //printf(&amp;quot;%f\n&amp;quot;, rsim-&amp;gt;particles[2].ay);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
    int N;&lt;br /&gt;
&lt;br /&gt;
    TimeLogger timelogger{};&lt;br /&gt;
&lt;br /&gt;
    struct reb_simulation* rsim = reb_simulation_create();&lt;br /&gt;
    reb_simulation_set_integrator(rsim, &amp;quot;whfast&amp;quot;);&lt;br /&gt;
    rsim-&amp;gt;heartbeat = &amp;amp;heartbeat;&lt;br /&gt;
&lt;br /&gt;
    //Central Mass Particle.&lt;br /&gt;
    struct reb_particle central = {0};&lt;br /&gt;
    central.m = 1.0;    //I&#039;m assuming this is Solar Mass Units.&lt;br /&gt;
    reb_simulation_add(rsim, central);&lt;br /&gt;
&lt;br /&gt;
    //Orbiting Massless Paricles&lt;br /&gt;
    printf(&amp;quot;Awaiting Input:&amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;, &amp;amp;N);&lt;br /&gt;
    timelogger.N = N;&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
        double a = reb_random_uniform(rsim, 0.4,20.);&lt;br /&gt;
        double e = reb_random_uniform(rsim, 0.01,0.2);&lt;br /&gt;
        double omega = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
        double f = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
&lt;br /&gt;
        struct reb_particle p = reb_particle_from_orbit(1.,rsim-&amp;gt;particles[0],0.,a,e,0.,0.,omega,f);&lt;br /&gt;
        reb_simulation_add(rsim, p);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Adding particle %d\n&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimStartTime();&lt;br /&gt;
&lt;br /&gt;
    //Sim Integration for 100s: dt=0.01s thus 10000 steps&lt;br /&gt;
    reb_simulation_integrate(rsim, 100);&lt;br /&gt;
    reb_simulation_move_to_com(rsim);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimEndTime();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;Writing Time Info to Log&amp;quot;);&lt;br /&gt;
    timelogger.WriteTimeToFile();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)timelogger.simstart);&lt;br /&gt;
    printf(&amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)timelogger.simend);&lt;br /&gt;
    printf(&amp;quot;Total Time: %lld\n\n&amp;quot;, timelogger.simdiff);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_output_orbits(rsim, &amp;quot;output&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_free(rsim);&lt;br /&gt;
&lt;br /&gt;
    system(&amp;quot;pause&amp;quot;);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMakeLists: ===&lt;br /&gt;
This project uses the rebound library as compiled from source in IntellaJ CLion rather than as provided by rebound&#039;s github, as CLion uses CMakeLists instead of Make, new compilation files had to be written.&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/src/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(rebound C)&lt;br /&gt;
&lt;br /&gt;
set(SOURCES rebound.c&lt;br /&gt;
        tree.c&lt;br /&gt;
        particle.c&lt;br /&gt;
        gravity.c&lt;br /&gt;
        integrator_whfast.c&lt;br /&gt;
        integrator_whfast512.c&lt;br /&gt;
        integrator_saba.c&lt;br /&gt;
        integrator_ias15.c&lt;br /&gt;
        integrator_sei.c&lt;br /&gt;
        integrator_bs.c&lt;br /&gt;
        integrator_leapfrog.c&lt;br /&gt;
        integrator_mercurius.c&lt;br /&gt;
        integrator_trace.c&lt;br /&gt;
        integrator_eos.c&lt;br /&gt;
        boundary.c&lt;br /&gt;
        binarydata.c&lt;br /&gt;
        output.c&lt;br /&gt;
        collision.c&lt;br /&gt;
        communication_mpi.c&lt;br /&gt;
        display.c&lt;br /&gt;
        tools.c&lt;br /&gt;
        rotations.c&lt;br /&gt;
        simulation.c&lt;br /&gt;
        derivatives.c&lt;br /&gt;
        simulationarchive.c&lt;br /&gt;
        glad.c&lt;br /&gt;
        integrator_janus.c&lt;br /&gt;
        transformations.c&lt;br /&gt;
        fmemopen.c&lt;br /&gt;
        server.c&lt;br /&gt;
        frequency_analysis.c)&lt;br /&gt;
&lt;br /&gt;
#object file build target.&lt;br /&gt;
add_library(rebound OBJECT ${SOURCES})&lt;br /&gt;
target_compile_definitions(rebound PRIVATE BUILDINGLIBREBOUND _GNU_SOURCE)&lt;br /&gt;
&lt;br /&gt;
#dll file build target.&lt;br /&gt;
add_library(librebound SHARED $&amp;lt;TARGET_OBJECTS:rebound&amp;gt;)&lt;br /&gt;
target_include_directories(librebound PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
target_compile_definitions(librebound PRIVATE _USRDLL _WINDLL)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(GalaxySim)&lt;br /&gt;
&lt;br /&gt;
add_subdirectory(${PROJECT_SOURCE_DIR}/src)&lt;br /&gt;
&lt;br /&gt;
add_executable(GalaxySim GalaxySim.cpp)&lt;br /&gt;
target_link_libraries(GalaxySim PRIVATE librebound)&lt;br /&gt;
#again, have to manually copy over .dll so the exe works.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benchmark Testing and Results: ===&lt;br /&gt;
Initial benchmark tests returned results consistent with an exponential rise in computing time, quadratic regression was then used to a curve fit, as provided by MATLAB&#039;s &#039;&#039;polyfit&#039;&#039; and &#039;&#039;polyval&#039;&#039; functions.&lt;br /&gt;
&lt;br /&gt;
The program was then run on a friend&#039;s considerably more powerful PC and results were compared.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
|[[File:GalaxySimFinalResults.png|thumb|700x700px]]&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Amount&lt;br /&gt;
!UNIX Time Start&lt;br /&gt;
!UNIX Time End&lt;br /&gt;
!Total Time (s)&lt;br /&gt;
!&lt;br /&gt;
!Amount&lt;br /&gt;
!Est Time (s)&lt;br /&gt;
|-&lt;br /&gt;
|50p&lt;br /&gt;
|1784779993&lt;br /&gt;
|1784779999&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|10,000p&lt;br /&gt;
|120429 (1.39 days)&lt;br /&gt;
|-&lt;br /&gt;
|100p&lt;br /&gt;
|1784780020&lt;br /&gt;
|1784780037&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|100,000p&lt;br /&gt;
|12004281 (4.56 months)&lt;br /&gt;
|-&lt;br /&gt;
|150p&lt;br /&gt;
|1784840470&lt;br /&gt;
|1784840504&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|1,000,000p&lt;br /&gt;
|1200042801 (38 yrs)&lt;br /&gt;
|-&lt;br /&gt;
|200p&lt;br /&gt;
|1784840585&lt;br /&gt;
|1784840643&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|250p&lt;br /&gt;
|1784840800&lt;br /&gt;
|1784840888&lt;br /&gt;
|88&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|300p&lt;br /&gt;
|1784840917&lt;br /&gt;
|1784841040&lt;br /&gt;
|123&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|350p&lt;br /&gt;
|1784853451&lt;br /&gt;
|1784853612&lt;br /&gt;
|161&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|400p&lt;br /&gt;
|1784853102&lt;br /&gt;
|1784853310&lt;br /&gt;
|208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|450p&lt;br /&gt;
|1784852796&lt;br /&gt;
|1784853057&lt;br /&gt;
|261&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|500p&lt;br /&gt;
|1784780056&lt;br /&gt;
|1784780380&lt;br /&gt;
|324&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|550p&lt;br /&gt;
|1784852388&lt;br /&gt;
|1784852773&lt;br /&gt;
|385&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|600p&lt;br /&gt;
|1784851882&lt;br /&gt;
|1784852335&lt;br /&gt;
|453&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|650p&lt;br /&gt;
|1784851333&lt;br /&gt;
|1784851862&lt;br /&gt;
|529&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|700p&lt;br /&gt;
|1784850690&lt;br /&gt;
|1784851298&lt;br /&gt;
|608&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|750p&lt;br /&gt;
|1784849967&lt;br /&gt;
|1784850660&lt;br /&gt;
|693&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|800p&lt;br /&gt;
|1784849060&lt;br /&gt;
|1784849858&lt;br /&gt;
|798&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|850p&lt;br /&gt;
|1784847886&lt;br /&gt;
|1784848777&lt;br /&gt;
|891&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|900p&lt;br /&gt;
|1784842807&lt;br /&gt;
|1784843812&lt;br /&gt;
|1005&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|950p&lt;br /&gt;
|1784841104&lt;br /&gt;
|1784842246&lt;br /&gt;
|1142&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|1000p&lt;br /&gt;
|1784782477&lt;br /&gt;
|1784783685&lt;br /&gt;
|1208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2000p&lt;br /&gt;
|1784834623&lt;br /&gt;
|1784839457&lt;br /&gt;
|4834&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Blue Line&#039;&#039;&#039;: My PC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Orange Line&#039;&#039;&#039;: Friends PC&lt;br /&gt;
&lt;br /&gt;
Data within table collected from my PC, see matlab code below for friends data.&lt;br /&gt;
&lt;br /&gt;
==== Matlab Quadratic Regression Code: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
x_dat_b = [0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,2000];&lt;br /&gt;
y_dat_b = [0,6,17,34,58,88,123,161,208,261,324,385,453,529,608,693,798,891,1005,1142,1208,4834];&lt;br /&gt;
&lt;br /&gt;
x_dat_j = [0, 100, 200, 300, 500, 700];&lt;br /&gt;
y_dat_j = [0, 11, 27, 60, 144, 288];&lt;br /&gt;
&lt;br /&gt;
x_dat_jo = [0,100,200,300,2000];&lt;br /&gt;
y_dat_jo = [0,8,26,54,2105];&lt;br /&gt;
&lt;br /&gt;
coeffs = polyfit(x_dat_jo,y_dat_jo,2);&lt;br /&gt;
&lt;br /&gt;
yvect = polyval(coeffs, x_dat_jo);&lt;br /&gt;
&lt;br /&gt;
sse = sum((y_dat_jo-yvect).^2);&lt;br /&gt;
sst = sum((y_dat_jo-mean(y_dat_jo)).^2);&lt;br /&gt;
&lt;br /&gt;
r2 = 1 - sse/sst;&lt;br /&gt;
&lt;br /&gt;
x_fun_b = 0:0.01:2500;&lt;br /&gt;
y_fun_b = 0.0012*x_fun_b.^2+0.0428*x_fun_b+1.3282;&lt;br /&gt;
&lt;br /&gt;
x_fun_j = 0:0.01:2500;&lt;br /&gt;
y_fun_j = 0.00055945*x_fun_j.^2+0.0142*x_fun_j+2.0172;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_b,y_fun_b);&lt;br /&gt;
xlabel(&#039;# of Particles&#039;);&lt;br /&gt;
ylabel(&#039;Time (s)&#039;);&lt;br /&gt;
hold on;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_j,y_fun_j);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_b,y_dat_b, &#039;blax&#039;);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_j,y_dat_j, &#039;x&#039;, &#039;Color&#039;, &#039;#47c4ed&#039;);&lt;br /&gt;
&lt;br /&gt;
hold off;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=92</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=92"/>
		<updated>2026-08-06T22:25:31Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
=== Abstract: ===&lt;br /&gt;
Main Website: https://rebound.hanno-rein.de/&lt;br /&gt;
&lt;br /&gt;
REBOUND is an N-Body integrator used to mathematically and computationally model the movement of particles under the influence of gravity. &lt;br /&gt;
&lt;br /&gt;
As all objects with mass will exert a gravitational pull, an absolute model of a solar system must account for all objects of mass regardless if their gravitational pull relatively small. For example, it is usually sufficient to only calculate the gravitational influence of the Sun when constructing a model of the solar system, but as each planet itself has mass, the planets too exert a gravitational force on the sun, thus pulling the sun off its own axis ever so slightly.   &lt;br /&gt;
&lt;br /&gt;
As a larger number of particles are added to the simulation, the number of gravitational interactions -and requisite equations needed- grow O(N²), resulting in ever inevitably computational times.&lt;br /&gt;
&lt;br /&gt;
Henceforth the idea to use such as a PC benchmarking test, albeit a rudimentary one.&lt;br /&gt;
&lt;br /&gt;
=== Rebound Simulation Code: ===&lt;br /&gt;
REBOUND&#039;s base code is written in C, whereas this project is written in C++ and compiled through Microsoft&#039;s vscode compiler. &lt;br /&gt;
&lt;br /&gt;
As a result &#039;&#039;restrict&#039;&#039; header tags must be redefined to &#039;&#039;__restrict&#039;&#039; -as for rebounds library be understood by the compiler-, and &#039;&#039;_USE_MATH_DEFINES&#039;&#039;, must be defined before the C&#039;s main library is allowed to run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;#define _USE_MATH_DEFINES&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define restrict __restrict&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#include &amp;quot;rebound.h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
#undef restrict&lt;br /&gt;
&lt;br /&gt;
class TimeLogger {&lt;br /&gt;
    public:&lt;br /&gt;
        time_t simstart;&lt;br /&gt;
        time_t simend;&lt;br /&gt;
        time_t simdiff;&lt;br /&gt;
&lt;br /&gt;
        int N;&lt;br /&gt;
&lt;br /&gt;
        void SetSimStartTime() {&lt;br /&gt;
            time(&amp;amp;simstart);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void SetSimEndTime() {&lt;br /&gt;
            time(&amp;amp;simend);&lt;br /&gt;
&lt;br /&gt;
            simdiff = simend - simstart;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void WriteTimeToFile() {&lt;br /&gt;
            FILE *fptimelog;&lt;br /&gt;
            char fname[64];&lt;br /&gt;
&lt;br /&gt;
            snprintf(fname, sizeof(fname),&amp;quot;%d_Particle_RSim_Log.txt&amp;quot;, N);&lt;br /&gt;
            FILE *fp_log = fopen(fname, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)simstart);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)simend);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Diff: %ld\n&amp;quot;, (long)simdiff);&lt;br /&gt;
&lt;br /&gt;
            fclose(fp_log);&lt;br /&gt;
        }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void heartbeat(struct reb_simulation* rsim) {&lt;br /&gt;
    if (reb_simulation_output_check(rsim, 1.0)){&lt;br /&gt;
        //Built-in progress line: N_tot, t, dt, cpu time, and % of tmax done&lt;br /&gt;
        reb_simulation_output_timing(rsim, 100.0);&lt;br /&gt;
&lt;br /&gt;
        //printf(&amp;quot;%f &amp;quot;, rsim-&amp;gt;particles[2].ax);&lt;br /&gt;
        //printf(&amp;quot;%f\n&amp;quot;, rsim-&amp;gt;particles[2].ay);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
    int N;&lt;br /&gt;
&lt;br /&gt;
    TimeLogger timelogger{};&lt;br /&gt;
&lt;br /&gt;
    struct reb_simulation* rsim = reb_simulation_create();&lt;br /&gt;
    reb_simulation_set_integrator(rsim, &amp;quot;whfast&amp;quot;);&lt;br /&gt;
    rsim-&amp;gt;heartbeat = &amp;amp;heartbeat;&lt;br /&gt;
&lt;br /&gt;
    //Central Mass Particle.&lt;br /&gt;
    struct reb_particle central = {0};&lt;br /&gt;
    central.m = 1.0;    //I&#039;m assuming this is Solar Mass Units.&lt;br /&gt;
    reb_simulation_add(rsim, central);&lt;br /&gt;
&lt;br /&gt;
    //Orbiting Massless Paricles&lt;br /&gt;
    printf(&amp;quot;Awaiting Input:&amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;, &amp;amp;N);&lt;br /&gt;
    timelogger.N = N;&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
        double a = reb_random_uniform(rsim, 0.4,20.);&lt;br /&gt;
        double e = reb_random_uniform(rsim, 0.01,0.2);&lt;br /&gt;
        double omega = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
        double f = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
&lt;br /&gt;
        struct reb_particle p = reb_particle_from_orbit(1.,rsim-&amp;gt;particles[0],0.,a,e,0.,0.,omega,f);&lt;br /&gt;
        reb_simulation_add(rsim, p);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Adding particle %d\n&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimStartTime();&lt;br /&gt;
&lt;br /&gt;
    //Sim Integration for 100s: dt=0.01s thus 10000 steps&lt;br /&gt;
    reb_simulation_integrate(rsim, 100);&lt;br /&gt;
    reb_simulation_move_to_com(rsim);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimEndTime();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;Writing Time Info to Log&amp;quot;);&lt;br /&gt;
    timelogger.WriteTimeToFile();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)timelogger.simstart);&lt;br /&gt;
    printf(&amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)timelogger.simend);&lt;br /&gt;
    printf(&amp;quot;Total Time: %lld\n\n&amp;quot;, timelogger.simdiff);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_output_orbits(rsim, &amp;quot;output&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_free(rsim);&lt;br /&gt;
&lt;br /&gt;
    system(&amp;quot;pause&amp;quot;);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMakeLists: ===&lt;br /&gt;
This project uses the rebound library as compiled from source in IntellaJ CLion rather than as provided by rebound&#039;s github, as CLion uses CMakeLists instead of Make, new compilation files had to be written.&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/src/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(rebound C)&lt;br /&gt;
&lt;br /&gt;
set(SOURCES rebound.c&lt;br /&gt;
        tree.c&lt;br /&gt;
        particle.c&lt;br /&gt;
        gravity.c&lt;br /&gt;
        integrator_whfast.c&lt;br /&gt;
        integrator_whfast512.c&lt;br /&gt;
        integrator_saba.c&lt;br /&gt;
        integrator_ias15.c&lt;br /&gt;
        integrator_sei.c&lt;br /&gt;
        integrator_bs.c&lt;br /&gt;
        integrator_leapfrog.c&lt;br /&gt;
        integrator_mercurius.c&lt;br /&gt;
        integrator_trace.c&lt;br /&gt;
        integrator_eos.c&lt;br /&gt;
        boundary.c&lt;br /&gt;
        binarydata.c&lt;br /&gt;
        output.c&lt;br /&gt;
        collision.c&lt;br /&gt;
        communication_mpi.c&lt;br /&gt;
        display.c&lt;br /&gt;
        tools.c&lt;br /&gt;
        rotations.c&lt;br /&gt;
        simulation.c&lt;br /&gt;
        derivatives.c&lt;br /&gt;
        simulationarchive.c&lt;br /&gt;
        glad.c&lt;br /&gt;
        integrator_janus.c&lt;br /&gt;
        transformations.c&lt;br /&gt;
        fmemopen.c&lt;br /&gt;
        server.c&lt;br /&gt;
        frequency_analysis.c)&lt;br /&gt;
&lt;br /&gt;
#object file build target.&lt;br /&gt;
add_library(rebound OBJECT ${SOURCES})&lt;br /&gt;
target_compile_definitions(rebound PRIVATE BUILDINGLIBREBOUND _GNU_SOURCE)&lt;br /&gt;
&lt;br /&gt;
#dll file build target.&lt;br /&gt;
add_library(librebound SHARED $&amp;lt;TARGET_OBJECTS:rebound&amp;gt;)&lt;br /&gt;
target_include_directories(librebound PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
target_compile_definitions(librebound PRIVATE _USRDLL _WINDLL)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(GalaxySim)&lt;br /&gt;
&lt;br /&gt;
add_subdirectory(${PROJECT_SOURCE_DIR}/src)&lt;br /&gt;
&lt;br /&gt;
add_executable(GalaxySim GalaxySim.cpp)&lt;br /&gt;
target_link_libraries(GalaxySim PRIVATE librebound)&lt;br /&gt;
#again, have to manually copy over .dll so the exe works.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benchmark Testing and Results: ===&lt;br /&gt;
Initial benchmark tests returned results consistent with an exponential rise in computing time, quadratic regression was then used to a curve fit, as provided by MATLAB&#039;s &#039;&#039;polyfit&#039;&#039; and &#039;&#039;polyval&#039;&#039; functions.&lt;br /&gt;
&lt;br /&gt;
The program was then run on a friend&#039;s considerably more powerful PC and results were compared.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
|[[File:GalaxySimFinalResults.png|thumb]]&lt;br /&gt;
|&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Amount&lt;br /&gt;
!UNIX Time Start&lt;br /&gt;
!UNIX Time End&lt;br /&gt;
!Total Time (s)&lt;br /&gt;
!&lt;br /&gt;
!Amount&lt;br /&gt;
!Est Time (s)&lt;br /&gt;
|-&lt;br /&gt;
|50p&lt;br /&gt;
|1784779993&lt;br /&gt;
|1784779999&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
|10,000p&lt;br /&gt;
|120429 (1.39 days)&lt;br /&gt;
|-&lt;br /&gt;
|100p&lt;br /&gt;
|1784780020&lt;br /&gt;
|1784780037&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|100,000p&lt;br /&gt;
|12004281 (4.56 months)&lt;br /&gt;
|-&lt;br /&gt;
|150p&lt;br /&gt;
|1784840470&lt;br /&gt;
|1784840504&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|1,000,000p&lt;br /&gt;
|1200042801 (38 yrs)&lt;br /&gt;
|-&lt;br /&gt;
|200p&lt;br /&gt;
|1784840585&lt;br /&gt;
|1784840643&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|250p&lt;br /&gt;
|1784840800&lt;br /&gt;
|1784840888&lt;br /&gt;
|88&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|300p&lt;br /&gt;
|1784840917&lt;br /&gt;
|1784841040&lt;br /&gt;
|123&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|350p&lt;br /&gt;
|1784853451&lt;br /&gt;
|1784853612&lt;br /&gt;
|161&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|400p&lt;br /&gt;
|1784853102&lt;br /&gt;
|1784853310&lt;br /&gt;
|208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|450p&lt;br /&gt;
|1784852796&lt;br /&gt;
|1784853057&lt;br /&gt;
|261&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|500p&lt;br /&gt;
|1784780056&lt;br /&gt;
|1784780380&lt;br /&gt;
|324&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|550p&lt;br /&gt;
|1784852388&lt;br /&gt;
|1784852773&lt;br /&gt;
|385&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|600p&lt;br /&gt;
|1784851882&lt;br /&gt;
|1784852335&lt;br /&gt;
|453&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|650p&lt;br /&gt;
|1784851333&lt;br /&gt;
|1784851862&lt;br /&gt;
|529&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|700p&lt;br /&gt;
|1784850690&lt;br /&gt;
|1784851298&lt;br /&gt;
|608&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|750p&lt;br /&gt;
|1784849967&lt;br /&gt;
|1784850660&lt;br /&gt;
|693&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|800p&lt;br /&gt;
|1784849060&lt;br /&gt;
|1784849858&lt;br /&gt;
|798&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|850p&lt;br /&gt;
|1784847886&lt;br /&gt;
|1784848777&lt;br /&gt;
|891&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|900p&lt;br /&gt;
|1784842807&lt;br /&gt;
|1784843812&lt;br /&gt;
|1005&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|950p&lt;br /&gt;
|1784841104&lt;br /&gt;
|1784842246&lt;br /&gt;
|1142&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|1000p&lt;br /&gt;
|1784782477&lt;br /&gt;
|1784783685&lt;br /&gt;
|1208&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|2000p&lt;br /&gt;
|1784834623&lt;br /&gt;
|1784839457&lt;br /&gt;
|4834&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Blue Line&#039;&#039;&#039;: My PC&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Orange Line&#039;&#039;&#039;: Friends PC&lt;br /&gt;
&lt;br /&gt;
Data within table collected from my PC, see matlab code below for friends data.&lt;br /&gt;
&lt;br /&gt;
==== Matlab Quadratic Regression Code: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
x_dat_b = [0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,2000];&lt;br /&gt;
y_dat_b = [0,6,17,34,58,88,123,161,208,261,324,385,453,529,608,693,798,891,1005,1142,1208,4834];&lt;br /&gt;
&lt;br /&gt;
x_dat_j = [0, 100, 200, 300, 500, 700];&lt;br /&gt;
y_dat_j = [0, 11, 27, 60, 144, 288];&lt;br /&gt;
&lt;br /&gt;
x_dat_jo = [0,100,200,300,2000];&lt;br /&gt;
y_dat_jo = [0,8,26,54,2105];&lt;br /&gt;
&lt;br /&gt;
coeffs = polyfit(x_dat_jo,y_dat_jo,2);&lt;br /&gt;
&lt;br /&gt;
yvect = polyval(coeffs, x_dat_jo);&lt;br /&gt;
&lt;br /&gt;
sse = sum((y_dat_jo-yvect).^2);&lt;br /&gt;
sst = sum((y_dat_jo-mean(y_dat_jo)).^2);&lt;br /&gt;
&lt;br /&gt;
r2 = 1 - sse/sst;&lt;br /&gt;
&lt;br /&gt;
x_fun_b = 0:0.01:2500;&lt;br /&gt;
y_fun_b = 0.0012*x_fun_b.^2+0.0428*x_fun_b+1.3282;&lt;br /&gt;
&lt;br /&gt;
x_fun_j = 0:0.01:2500;&lt;br /&gt;
y_fun_j = 0.00055945*x_fun_j.^2+0.0142*x_fun_j+2.0172;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_b,y_fun_b);&lt;br /&gt;
xlabel(&#039;# of Particles&#039;);&lt;br /&gt;
ylabel(&#039;Time (s)&#039;);&lt;br /&gt;
hold on;&lt;br /&gt;
&lt;br /&gt;
plot(x_fun_j,y_fun_j);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_b,y_dat_b, &#039;blax&#039;);&lt;br /&gt;
&lt;br /&gt;
plot(x_dat_j,y_dat_j, &#039;x&#039;, &#039;Color&#039;, &#039;#47c4ed&#039;);&lt;br /&gt;
&lt;br /&gt;
hold off;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=File:GalaxySimFinalResults.png&amp;diff=91</id>
		<title>File:GalaxySimFinalResults.png</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=File:GalaxySimFinalResults.png&amp;diff=91"/>
		<updated>2026-08-06T22:15:02Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Galaxy?Sim Results&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=90</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=90"/>
		<updated>2026-08-06T22:02:34Z</updated>

		<summary type="html">&lt;p&gt;Brett: base info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
=== Abstract: ===&lt;br /&gt;
Main Website: https://rebound.hanno-rein.de/&lt;br /&gt;
&lt;br /&gt;
REBOUND is an N-Body integrator used to mathematically and computationally model the movement of particles under the influence of gravity. &lt;br /&gt;
&lt;br /&gt;
As all objects with mass will exert a gravitational pull, an absolute model of a solar system must account for all objects of mass regardless if their gravitational pull relatively small. For example, it is usually sufficient to only calculate the gravitational influence of the Sun when constructing a model of the solar system, but as each planet itself has mass, the planets too exert a gravitational force on the sun, thus pulling the sun off its own axis ever so slightly.   &lt;br /&gt;
&lt;br /&gt;
As a larger number of particles are added to the simulation, the number of gravitational interactions -and requisite equations needed- grow O(N²), resulting in ever inevitably computational times.&lt;br /&gt;
&lt;br /&gt;
Henceforth the idea to use such as a PC benchmarking test, albeit a rudimentary one.&lt;br /&gt;
&lt;br /&gt;
=== Rebound Simulation Code: ===&lt;br /&gt;
REBOUND&#039;s base code is written in C, whereas this project is written in C++ and compiled through Microsoft&#039;s vscode compiler. &lt;br /&gt;
&lt;br /&gt;
As a result &#039;&#039;restrict&#039;&#039; header tags must be redefined to &#039;&#039;__restrict&#039;&#039; -as for rebounds library be understood by the compiler-, and &#039;&#039;_USE_MATH_DEFINES&#039;&#039;, must be defined before the C&#039;s main library is allowed to run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;#define _USE_MATH_DEFINES&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define restrict __restrict&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#include &amp;quot;rebound.h&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
#undef restrict&lt;br /&gt;
&lt;br /&gt;
class TimeLogger {&lt;br /&gt;
    public:&lt;br /&gt;
        time_t simstart;&lt;br /&gt;
        time_t simend;&lt;br /&gt;
        time_t simdiff;&lt;br /&gt;
&lt;br /&gt;
        int N;&lt;br /&gt;
&lt;br /&gt;
        void SetSimStartTime() {&lt;br /&gt;
            time(&amp;amp;simstart);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void SetSimEndTime() {&lt;br /&gt;
            time(&amp;amp;simend);&lt;br /&gt;
&lt;br /&gt;
            simdiff = simend - simstart;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        void WriteTimeToFile() {&lt;br /&gt;
            FILE *fptimelog;&lt;br /&gt;
            char fname[64];&lt;br /&gt;
&lt;br /&gt;
            snprintf(fname, sizeof(fname),&amp;quot;%d_Particle_RSim_Log.txt&amp;quot;, N);&lt;br /&gt;
            FILE *fp_log = fopen(fname, &amp;quot;w&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)simstart);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)simend);&lt;br /&gt;
            fprintf(fp_log, &amp;quot;UNIX Time Diff: %ld\n&amp;quot;, (long)simdiff);&lt;br /&gt;
&lt;br /&gt;
            fclose(fp_log);&lt;br /&gt;
        }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void heartbeat(struct reb_simulation* rsim) {&lt;br /&gt;
    if (reb_simulation_output_check(rsim, 1.0)){&lt;br /&gt;
        //Built-in progress line: N_tot, t, dt, cpu time, and % of tmax done&lt;br /&gt;
        reb_simulation_output_timing(rsim, 100.0);&lt;br /&gt;
&lt;br /&gt;
        //printf(&amp;quot;%f &amp;quot;, rsim-&amp;gt;particles[2].ax);&lt;br /&gt;
        //printf(&amp;quot;%f\n&amp;quot;, rsim-&amp;gt;particles[2].ay);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
    int N;&lt;br /&gt;
&lt;br /&gt;
    TimeLogger timelogger{};&lt;br /&gt;
&lt;br /&gt;
    struct reb_simulation* rsim = reb_simulation_create();&lt;br /&gt;
    reb_simulation_set_integrator(rsim, &amp;quot;whfast&amp;quot;);&lt;br /&gt;
    rsim-&amp;gt;heartbeat = &amp;amp;heartbeat;&lt;br /&gt;
&lt;br /&gt;
    //Central Mass Particle.&lt;br /&gt;
    struct reb_particle central = {0};&lt;br /&gt;
    central.m = 1.0;    //I&#039;m assuming this is Solar Mass Units.&lt;br /&gt;
    reb_simulation_add(rsim, central);&lt;br /&gt;
&lt;br /&gt;
    //Orbiting Massless Paricles&lt;br /&gt;
    printf(&amp;quot;Awaiting Input:&amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;, &amp;amp;N);&lt;br /&gt;
    timelogger.N = N;&lt;br /&gt;
&lt;br /&gt;
    for (int i = 0; i &amp;lt; N; i++) {&lt;br /&gt;
        double a = reb_random_uniform(rsim, 0.4,20.);&lt;br /&gt;
        double e = reb_random_uniform(rsim, 0.01,0.2);&lt;br /&gt;
        double omega = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
        double f = reb_random_uniform(rsim, 0.,2.*M_PI);&lt;br /&gt;
&lt;br /&gt;
        struct reb_particle p = reb_particle_from_orbit(1.,rsim-&amp;gt;particles[0],0.,a,e,0.,0.,omega,f);&lt;br /&gt;
        reb_simulation_add(rsim, p);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Adding particle %d\n&amp;quot;, i);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimStartTime();&lt;br /&gt;
&lt;br /&gt;
    //Sim Integration for 100s: dt=0.01s thus 10000 steps&lt;br /&gt;
    reb_simulation_integrate(rsim, 100);&lt;br /&gt;
    reb_simulation_move_to_com(rsim);&lt;br /&gt;
&lt;br /&gt;
    timelogger.SetSimEndTime();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;Writing Time Info to Log&amp;quot;);&lt;br /&gt;
    timelogger.WriteTimeToFile();&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;UNIX Time Start: %ld\n&amp;quot;, (long)timelogger.simstart);&lt;br /&gt;
    printf(&amp;quot;UNIX Time End: %ld\n&amp;quot;, (long)timelogger.simend);&lt;br /&gt;
    printf(&amp;quot;Total Time: %lld\n\n&amp;quot;, timelogger.simdiff);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_output_orbits(rsim, &amp;quot;output&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    reb_simulation_free(rsim);&lt;br /&gt;
&lt;br /&gt;
    system(&amp;quot;pause&amp;quot;);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CMakeLists: ===&lt;br /&gt;
This project uses the rebound library as compiled from source in IntellaJ CLion rather than as provided by rebound&#039;s github, as CLion uses CMakeLists instead of Make, new compilation files had to be written.&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/src/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(rebound C)&lt;br /&gt;
&lt;br /&gt;
set(SOURCES rebound.c&lt;br /&gt;
        tree.c&lt;br /&gt;
        particle.c&lt;br /&gt;
        gravity.c&lt;br /&gt;
        integrator_whfast.c&lt;br /&gt;
        integrator_whfast512.c&lt;br /&gt;
        integrator_saba.c&lt;br /&gt;
        integrator_ias15.c&lt;br /&gt;
        integrator_sei.c&lt;br /&gt;
        integrator_bs.c&lt;br /&gt;
        integrator_leapfrog.c&lt;br /&gt;
        integrator_mercurius.c&lt;br /&gt;
        integrator_trace.c&lt;br /&gt;
        integrator_eos.c&lt;br /&gt;
        boundary.c&lt;br /&gt;
        binarydata.c&lt;br /&gt;
        output.c&lt;br /&gt;
        collision.c&lt;br /&gt;
        communication_mpi.c&lt;br /&gt;
        display.c&lt;br /&gt;
        tools.c&lt;br /&gt;
        rotations.c&lt;br /&gt;
        simulation.c&lt;br /&gt;
        derivatives.c&lt;br /&gt;
        simulationarchive.c&lt;br /&gt;
        glad.c&lt;br /&gt;
        integrator_janus.c&lt;br /&gt;
        transformations.c&lt;br /&gt;
        fmemopen.c&lt;br /&gt;
        server.c&lt;br /&gt;
        frequency_analysis.c)&lt;br /&gt;
&lt;br /&gt;
#object file build target.&lt;br /&gt;
add_library(rebound OBJECT ${SOURCES})&lt;br /&gt;
target_compile_definitions(rebound PRIVATE BUILDINGLIBREBOUND _GNU_SOURCE)&lt;br /&gt;
&lt;br /&gt;
#dll file build target.&lt;br /&gt;
add_library(librebound SHARED $&amp;lt;TARGET_OBJECTS:rebound&amp;gt;)&lt;br /&gt;
target_include_directories(librebound PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})&lt;br /&gt;
target_compile_definitions(librebound PRIVATE _USRDLL _WINDLL)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GalaxySim/CMakeLists.txt: ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 3.31)&lt;br /&gt;
project(GalaxySim)&lt;br /&gt;
&lt;br /&gt;
add_subdirectory(${PROJECT_SOURCE_DIR}/src)&lt;br /&gt;
&lt;br /&gt;
add_executable(GalaxySim GalaxySim.cpp)&lt;br /&gt;
target_link_libraries(GalaxySim PRIVATE librebound)&lt;br /&gt;
#again, have to manually copy over .dll so the exe works.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=89</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=89"/>
		<updated>2026-08-06T21:18:23Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
=== Basic Info: ===&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=88</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=88"/>
		<updated>2026-08-06T21:17:36Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mathematics ==&lt;br /&gt;
*[[Mathematical Literature Resources]] &lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [[Chemistry Literature Resources]]&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
* [[Organic Chemistry Lab Papers]]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
* [[Catalog of Electronic Blocks w/ Equations]] &lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;br /&gt;
* [[REBOUND Simulation and PC Benchmarking Tests]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=87</id>
		<title>Template:Quote</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=87"/>
		<updated>2026-08-06T21:13:20Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote class=&amp;quot;templatequote&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;Bug6200&amp;quot;&amp;gt;{{{text|{{{quote|{{{1|&amp;lt;noinclude&amp;gt;{{lorem ipsum}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}&amp;lt;/includeonly&amp;gt;}}}}}}}}}&amp;lt;/div&amp;gt;{{#if:{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}}}}&lt;br /&gt;
 |&amp;lt;div class=&amp;quot;templatequotecite&amp;quot;&amp;gt;&amp;amp;#8212;{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;[[Someone&#039;s full name|Someone]]&amp;lt;/noinclude&amp;gt;}}}}}}}}}{{#if:{{{source|{{{3|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}&lt;br /&gt;
  |,&amp;amp;nbsp;&amp;lt;cite&amp;gt;{{{source|{{{3|&amp;lt;noinclude&amp;gt;Source&amp;lt;/noinclude&amp;gt;}}}}}}&amp;lt;/cite&amp;gt;&lt;br /&gt;
 }}&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&amp;lt;/blockquote&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Credit to: https://www.mediawiki.org/wiki/Template:Quote&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=86</id>
		<title>Template:Quote</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=86"/>
		<updated>2026-08-06T21:11:38Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote class=&amp;quot;templatequote&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;Bug6200&amp;quot;&amp;gt;{{{text|{{{quote|{{{1|&amp;lt;noinclude&amp;gt;{{lorem ipsum}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}&amp;lt;/includeonly&amp;gt;}}}}}}}}}&amp;lt;/div&amp;gt;{{#if:{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}}}}&lt;br /&gt;
 |&amp;lt;div class=&amp;quot;templatequotecite&amp;quot;&amp;gt;&amp;amp;#8212;{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;[[Someone&#039;s full name|Someone]]&amp;lt;/noinclude&amp;gt;}}}}}}}}}{{#if:{{{source|{{{3|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}&lt;br /&gt;
  |,&amp;amp;nbsp;&amp;lt;cite&amp;gt;{{{source|{{{3|&amp;lt;noinclude&amp;gt;Source&amp;lt;/noinclude&amp;gt;}}}}}}&amp;lt;/cite&amp;gt;&lt;br /&gt;
 }}&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&amp;lt;/blockquote&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Credit to: https://www.mediawiki.org/wiki/Template:Quote&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=85</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=85"/>
		<updated>2026-08-06T21:02:06Z</updated>

		<summary type="html">&lt;p&gt;Brett: quote test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quote|text=The journey of a thousand lines of code, begins w/ a single CMake.txt file... that doesn&#039;t want to work. |sign=Me|source=attempting to compile &#039;&#039;&#039;anything&#039;&#039;&#039; from source}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
placeholder text&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=84</id>
		<title>Template:Quote</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=84"/>
		<updated>2026-08-06T20:56:56Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote class=&amp;quot;templatequote&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;Bug6200&amp;quot;&amp;gt;{{{text|{{{quote|{{{1|&amp;lt;noinclude&amp;gt;{{lorem ipsum}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}&amp;lt;/includeonly&amp;gt;}}}}}}}}}&amp;lt;/div&amp;gt;{{#if:{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}}}}&lt;br /&gt;
 |&amp;lt;div class=&amp;quot;templatequotecite&amp;quot;&amp;gt;&amp;amp;#8212;{{{sign|{{{cite|{{{2|&amp;lt;noinclude&amp;gt;[[Someone&#039;s full name|Someone]]&amp;lt;/noinclude&amp;gt;}}}}}}}}}{{#if:{{{source|{{{3|&amp;lt;noinclude&amp;gt;TRUE&amp;lt;/noinclude&amp;gt;}}}}}}&lt;br /&gt;
  |,&amp;amp;nbsp;&amp;lt;cite&amp;gt;{{{source|{{{3|&amp;lt;noinclude&amp;gt;Source&amp;lt;/noinclude&amp;gt;}}}}}}&amp;lt;/cite&amp;gt;&lt;br /&gt;
 }}&amp;lt;/div&amp;gt;&lt;br /&gt;
}}&amp;lt;/blockquote&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=83</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=83"/>
		<updated>2026-08-06T20:51:42Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;{{quote|test}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
placeholder text&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=82</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=82"/>
		<updated>2026-08-06T20:51:18Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{quote|test}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
placeholder text&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=81</id>
		<title>Template:Quote</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Quote&amp;diff=81"/>
		<updated>2026-08-06T20:50:47Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;&amp;lt;div style=&amp;quot;background-color: #ddf5eb; border-style: dotted;&amp;quot;&amp;gt; {{{1}}} &amp;lt;/div&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #ddf5eb; border-style: dotted;&amp;quot;&amp;gt;&lt;br /&gt;
{{{1}}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=80</id>
		<title>REBOUND Simulation and PC Benchmarking Tests</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=REBOUND_Simulation_and_PC_Benchmarking_Tests&amp;diff=80"/>
		<updated>2026-08-06T20:44:09Z</updated>

		<summary type="html">&lt;p&gt;Brett: added page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;placeholder text&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Catalog_of_Electronic_Blocks_w/_Equations&amp;diff=79</id>
		<title>Catalog of Electronic Blocks w/ Equations</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Catalog_of_Electronic_Blocks_w/_Equations&amp;diff=79"/>
		<updated>2026-08-06T20:43:17Z</updated>

		<summary type="html">&lt;p&gt;Brett: added page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Op-Amp Phase Shift Oscillator]]&lt;br /&gt;
* [[Op-Amp Band Pass Block]]&lt;br /&gt;
* [[BJT Biasing Test]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=78</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=78"/>
		<updated>2026-08-06T20:39:41Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* Electronics */  and Computer Science additions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mathematics ==&lt;br /&gt;
*[[Mathematical Literature Resources]] &lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
* [[Catalog of Electronic Blocks w/ Equations]] &lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;br /&gt;
* [[REBOUND Simulation and PC Benchmarking Tests]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=77</id>
		<title>CIWA:About</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=77"/>
		<updated>2026-08-05T21:26:41Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A place to catalogue and unify my own personal projects, critical references, and knowledge in an increasingly chaotic and fragmented internet.  &lt;br /&gt;
&lt;br /&gt;
CIWA Logo inspired by: NERV Logo, &#039;&#039;Neon Genesis Evangelion.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Created on 2026-05-23.&lt;br /&gt;
&lt;br /&gt;
-&#039;&#039;Brett Lewis Czeto&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=76</id>
		<title>CIWA:About</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=76"/>
		<updated>2026-08-05T21:26:23Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A place to catalogue and unify my own personal projects, critical references, and knowledge in an increasingly chaotic and fragmented internet.  &lt;br /&gt;
&lt;br /&gt;
CIWA Logo inspired by: NERV Logo, &#039;&#039;Neon Genesis Evangelion.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Created on 2026-05-23.&lt;br /&gt;
&lt;br /&gt;
-&#039;&#039;Brett Lewis Czeto&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=75</id>
		<title>CIWA:About</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=CIWA:About&amp;diff=75"/>
		<updated>2026-08-05T21:20:55Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A place to catalogue and unify my own personal projects, critical references, and knowledge in an increasingly chaotic and fragmented internet.  &lt;br /&gt;
&lt;br /&gt;
Created on 2026-05-23.&lt;br /&gt;
&lt;br /&gt;
-&#039;&#039;Brett Lewis Czeto&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Electronic_Literature_Resources&amp;diff=74</id>
		<title>Electronic Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Electronic_Literature_Resources&amp;diff=74"/>
		<updated>2026-08-05T21:12:20Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow I.E.E.E. standards unless otherwise stated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
* R. Sobot, Wireless Communication Electronics: Introduction to RF Circuits and Design Techniques, 2nd ed. Cham, Switzerland: Springer, 2021. doi: 10.1007/978-3-030-48630-3.&lt;br /&gt;
&lt;br /&gt;
* P. Horowitz and W. Hill, The Art of Electronics, 3rd ed. Cambridge, U.K.: Cambridge University Press, 2015. ISBN: 9780521809269.&lt;br /&gt;
&lt;br /&gt;
== Academic Papers ==&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=73</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=73"/>
		<updated>2026-08-05T21:11:46Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* Mathematics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mathematics ==&lt;br /&gt;
*[[Mathematical Literature Resources]] &lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Mathematical_Literature_Resources&amp;diff=72</id>
		<title>Mathematical Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Mathematical_Literature_Resources&amp;diff=72"/>
		<updated>2026-08-05T21:11:18Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow A.M.S. standards unless otherwise stated.&#039;&#039;&lt;br /&gt;
== Books ==&lt;br /&gt;
* P. Dyke, An Introduction to Laplace Transforms and Fourier Series, 2nd ed., Springer Undergraduate Mathematics Series, Springer, London, 2014, DOI: 10.1007/978-1-4471-6395-4.&lt;br /&gt;
== Academic Papers ==&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Mathematical_Literature_Resources&amp;diff=71</id>
		<title>Mathematical Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Mathematical_Literature_Resources&amp;diff=71"/>
		<updated>2026-08-05T21:10:51Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;&amp;#039;&amp;#039;Note: Citations follow AMS standards unless otherwise stated.&amp;#039;&amp;#039; == Books == * P. Dyke, An Introduction to Laplace Transforms and Fourier Series, 2nd ed., Springer Undergraduate Mathematics Series, Springer, London, 2014, DOI: 10.1007/978-1-4471-6395-4. == Academic Papers ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow AMS standards unless otherwise stated.&#039;&#039;&lt;br /&gt;
== Books ==&lt;br /&gt;
* P. Dyke, An Introduction to Laplace Transforms and Fourier Series, 2nd ed., Springer Undergraduate Mathematics Series, Springer, London, 2014, DOI: 10.1007/978-1-4471-6395-4.&lt;br /&gt;
== Academic Papers ==&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=70</id>
		<title>Czeto Internal Wiki and Archive</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Czeto_Internal_Wiki_and_Archive&amp;diff=70"/>
		<updated>2026-08-05T21:05:39Z</updated>

		<summary type="html">&lt;p&gt;Brett: /* Electronics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mathematics ==&lt;br /&gt;
*[[Integrals|List of Integrals]]&lt;br /&gt;
*[[Derivatives|List of Derivatives]]&lt;br /&gt;
&lt;br /&gt;
== Chemistry ==&lt;br /&gt;
&lt;br /&gt;
* [https://sdbs.db.aist.go.jp/ AIST: Spectral Database for Organic Compounds]&lt;br /&gt;
&lt;br /&gt;
== Electronics ==&lt;br /&gt;
&lt;br /&gt;
* [[Electronic Literature Resources]]&lt;br /&gt;
* [[Transfer Function Solving Process w/ Example]]&lt;br /&gt;
&lt;br /&gt;
== Computer Science ==&lt;br /&gt;
&lt;br /&gt;
* [[MediaWiki Programming Resources]]&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Electronic_Literature_Resources&amp;diff=69</id>
		<title>Electronic Literature Resources</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Electronic_Literature_Resources&amp;diff=69"/>
		<updated>2026-08-05T21:04:27Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;&amp;#039;&amp;#039;Note: Citations follow IEEE standards unless otherwise stated.&amp;#039;&amp;#039;  == Books == * R. Sobot, Wireless Communication Electronics: Introduction to RF Circuits and Design Techniques, 2nd ed. Cham, Switzerland: Springer, 2021. doi: 10.1007/978-3-030-48630-3.  * P. Horowitz and W. Hill, The Art of Electronics, 3rd ed. Cambridge, U.K.: Cambridge University Press, 2015. ISBN: 9780521809269.  == Academic Papers ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Note: Citations follow IEEE standards unless otherwise stated.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
* R. Sobot, Wireless Communication Electronics: Introduction to RF Circuits and Design Techniques, 2nd ed. Cham, Switzerland: Springer, 2021. doi: 10.1007/978-3-030-48630-3.&lt;br /&gt;
&lt;br /&gt;
* P. Horowitz and W. Hill, The Art of Electronics, 3rd ed. Cambridge, U.K.: Cambridge University Press, 2015. ISBN: 9780521809269.&lt;br /&gt;
&lt;br /&gt;
== Academic Papers ==&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=68</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=68"/>
		<updated>2026-07-02T02:26:43Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCircuitFixPNG.png|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=67</id>
		<title>Template:Infobox core</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=67"/>
		<updated>2026-07-01T21:50:06Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Metatemplates]]&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&amp;lt;div style=&amp;quot;clear:both; float:{{{float|right}}}; width:{{{width|300px}}}; margin:0 0 1.3em 1.4em&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;div style=&amp;quot;background-color:#323232; border-radius:.3em; box-shadow:rgb(0 0 0 / 10%) 0 0 4px .1em; text-align:center&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{header|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-top-left-radius:.3em; border-top-right-radius:.3em; padding-block:.5em; {{{headerstyle}}}&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;color:#fff; font-weight:bold; font-size:132%; padding:0;&amp;quot;&amp;gt;{{{header}}}&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{image|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image|}}}|{{{imagetooltip|}}}|{{{imagewidth|{{{width|300px}}}}}}{{#if:{{{imagelink|}}}|{{!}}link={{{imagelink}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{image2|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image2|}}}|{{{imagetooltip2|}}}|{{{imagewidth2|{{{width|300px}}}}}}{{#if:{{{imagelink2|}}}|{{!}}link={{{imagelink2}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section1|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section1style}}}&amp;quot;&amp;gt;{{{section1}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content1|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content1style}}}&amp;quot;&amp;gt;{{{content1|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section2|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section2style}}}&amp;quot;&amp;gt;{{{section2}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content2|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content2style}}}&amp;quot;&amp;gt;{{{content2|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section3|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section3style}}}&amp;quot;&amp;gt;{{{section3}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content3|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content3style}}}&amp;quot;&amp;gt;{{{content3|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section4|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section4style}}}&amp;quot;&amp;gt;{{{section4}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content4|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content4style}}}&amp;quot;&amp;gt;{{{content4|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section5|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section5style}}}&amp;quot;&amp;gt;{{{section5}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content5|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content5style}}}&amp;quot;&amp;gt;{{{content5|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section6|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section6style}}}&amp;quot;&amp;gt;{{{section6}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content6|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content6style}}}&amp;quot;&amp;gt;{{{content6|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section7|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section7style}}}&amp;quot;&amp;gt;{{{section7}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content7|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content7style}}}&amp;quot;&amp;gt;{{{content7|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section8|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section8style}}}&amp;quot;&amp;gt;{{{section8}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content8|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content8style}}}&amp;quot;&amp;gt;{{{content8|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section9|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section9style}}}&amp;quot;&amp;gt;{{{section9}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content9|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content9style}}}&amp;quot;&amp;gt;{{{content9|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section10|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section10style}}}&amp;quot;&amp;gt;{{{section10}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content10|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content10style}}}&amp;quot;&amp;gt;{{{content10|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section11|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section11style}}}&amp;quot;&amp;gt;{{{section11}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content11|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content11style}}}&amp;quot;&amp;gt;{{{content11|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section12|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section12style}}}&amp;quot;&amp;gt;{{{section12}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content12|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content12style}}}&amp;quot;&amp;gt;{{{content12|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section13|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section13style}}}&amp;quot;&amp;gt;{{{section13}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content13|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content13style}}}&amp;quot;&amp;gt;{{{content13|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section14|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section14style}}}&amp;quot;&amp;gt;{{{section14}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content14|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content14style}}}&amp;quot;&amp;gt;{{{content14|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section15|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section15style}}}&amp;quot;&amp;gt;{{{section15}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content15|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content15style}}}&amp;quot;&amp;gt;{{{content15|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section16|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section16style}}}&amp;quot;&amp;gt;{{{section16}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content16|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content16style}}}&amp;quot;&amp;gt;{{{content16|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section17|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section17style}}}&amp;quot;&amp;gt;{{{section17}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content17|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content17style}}}&amp;quot;&amp;gt;{{{content17|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section18|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section18style}}}&amp;quot;&amp;gt;{{{section18}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content18|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content18style}}}&amp;quot;&amp;gt;{{{content18|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section19|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section19style}}}&amp;quot;&amp;gt;{{{section19}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content19|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content19style}}}&amp;quot;&amp;gt;{{{content19|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section20|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section20style}}}&amp;quot;&amp;gt;{{{section20}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content20|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content20style}}}&amp;quot;&amp;gt;{{{content20|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{footer|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-bottom-left-radius:.3em; border-bottom-right-radius:.3em; padding:.5em; {{{footerstyle}}}&amp;quot;&amp;gt;{{{footer}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Infobox core&lt;br /&gt;
| header = Foo bar }}&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=66</id>
		<title>Template:Infobox core</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=66"/>
		<updated>2026-07-01T21:43:45Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation}}&lt;br /&gt;
[[Category:Metatemplates]]&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&amp;lt;div style=&amp;quot;clear:both; float:{{{float|right}}}; width:{{{width|300px}}}; margin:0 0 1.3em 1.4em&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;div style=&amp;quot;background-color:#323232; border-radius:.3em; box-shadow:rgb(0 0 0 / 10%) 0 0 4px .1em; text-align:center&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{header|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-top-left-radius:.3em; border-top-right-radius:.3em; padding-block:.5em; {{{headerstyle}}}&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;color:#fff; font-weight:bold; font-size:132%; padding:0;&amp;quot;&amp;gt;{{{header}}}&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{image|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image|}}}|{{{imagetooltip|}}}|{{{imagewidth|{{{width|300px}}}}}}{{#if:{{{imagelink|}}}|{{!}}link={{{imagelink}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{image2|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image2|}}}|{{{imagetooltip2|}}}|{{{imagewidth2|{{{width|300px}}}}}}{{#if:{{{imagelink2|}}}|{{!}}link={{{imagelink2}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section1|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section1style}}}&amp;quot;&amp;gt;{{{section1}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content1|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content1style}}}&amp;quot;&amp;gt;{{{content1|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section2|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section2style}}}&amp;quot;&amp;gt;{{{section2}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content2|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content2style}}}&amp;quot;&amp;gt;{{{content2|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section3|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section3style}}}&amp;quot;&amp;gt;{{{section3}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content3|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content3style}}}&amp;quot;&amp;gt;{{{content3|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section4|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section4style}}}&amp;quot;&amp;gt;{{{section4}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content4|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content4style}}}&amp;quot;&amp;gt;{{{content4|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section5|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section5style}}}&amp;quot;&amp;gt;{{{section5}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content5|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content5style}}}&amp;quot;&amp;gt;{{{content5|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section6|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section6style}}}&amp;quot;&amp;gt;{{{section6}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content6|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content6style}}}&amp;quot;&amp;gt;{{{content6|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section7|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section7style}}}&amp;quot;&amp;gt;{{{section7}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content7|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content7style}}}&amp;quot;&amp;gt;{{{content7|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section8|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section8style}}}&amp;quot;&amp;gt;{{{section8}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content8|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content8style}}}&amp;quot;&amp;gt;{{{content8|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section9|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section9style}}}&amp;quot;&amp;gt;{{{section9}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content9|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content9style}}}&amp;quot;&amp;gt;{{{content9|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section10|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section10style}}}&amp;quot;&amp;gt;{{{section10}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content10|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content10style}}}&amp;quot;&amp;gt;{{{content10|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section11|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section11style}}}&amp;quot;&amp;gt;{{{section11}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content11|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content11style}}}&amp;quot;&amp;gt;{{{content11|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section12|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section12style}}}&amp;quot;&amp;gt;{{{section12}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content12|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content12style}}}&amp;quot;&amp;gt;{{{content12|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section13|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section13style}}}&amp;quot;&amp;gt;{{{section13}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content13|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content13style}}}&amp;quot;&amp;gt;{{{content13|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section14|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section14style}}}&amp;quot;&amp;gt;{{{section14}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content14|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content14style}}}&amp;quot;&amp;gt;{{{content14|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section15|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section15style}}}&amp;quot;&amp;gt;{{{section15}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content15|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content15style}}}&amp;quot;&amp;gt;{{{content15|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section16|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section16style}}}&amp;quot;&amp;gt;{{{section16}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content16|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content16style}}}&amp;quot;&amp;gt;{{{content16|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section17|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section17style}}}&amp;quot;&amp;gt;{{{section17}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content17|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content17style}}}&amp;quot;&amp;gt;{{{content17|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section18|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section18style}}}&amp;quot;&amp;gt;{{{section18}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content18|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content18style}}}&amp;quot;&amp;gt;{{{content18|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section19|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section19style}}}&amp;quot;&amp;gt;{{{section19}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content19|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content19style}}}&amp;quot;&amp;gt;{{{content19|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section20|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section20style}}}&amp;quot;&amp;gt;{{{section20}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content20|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content20style}}}&amp;quot;&amp;gt;{{{content20|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{footer|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-bottom-left-radius:.3em; border-bottom-right-radius:.3em; padding:.5em; {{{footerstyle}}}&amp;quot;&amp;gt;{{{footer}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Infobox core}}&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=65</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=65"/>
		<updated>2026-07-01T21:41:01Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCircuitFixPNG.png|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Final Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Final Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=64</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=64"/>
		<updated>2026-07-01T21:39:52Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCircuitFixPNG.png|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Final Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Final Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Infobox core}}&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=63</id>
		<title>Template:Infobox core</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=63"/>
		<updated>2026-07-01T21:38:24Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Metatemplates]]&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&amp;lt;div style=&amp;quot;clear:both; float:{{{float|right}}}; width:{{{width|300px}}}; margin:0 0 1.3em 1.4em&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;div style=&amp;quot;background-color:#323232; border-radius:.3em; box-shadow:rgb(0 0 0 / 10%) 0 0 4px .1em; text-align:center&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{header|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-top-left-radius:.3em; border-top-right-radius:.3em; padding-block:.5em; {{{headerstyle}}}&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;color:#fff; font-weight:bold; font-size:132%; padding:0;&amp;quot;&amp;gt;{{{header}}}&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{image|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image|}}}|{{{imagetooltip|}}}|{{{imagewidth|{{{width|300px}}}}}}{{#if:{{{imagelink|}}}|{{!}}link={{{imagelink}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{image2|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image2|}}}|{{{imagetooltip2|}}}|{{{imagewidth2|{{{width|300px}}}}}}{{#if:{{{imagelink2|}}}|{{!}}link={{{imagelink2}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section1|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section1style}}}&amp;quot;&amp;gt;{{{section1}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content1|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content1style}}}&amp;quot;&amp;gt;{{{content1|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section2|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section2style}}}&amp;quot;&amp;gt;{{{section2}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content2|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content2style}}}&amp;quot;&amp;gt;{{{content2|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section3|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section3style}}}&amp;quot;&amp;gt;{{{section3}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content3|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content3style}}}&amp;quot;&amp;gt;{{{content3|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section4|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section4style}}}&amp;quot;&amp;gt;{{{section4}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content4|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content4style}}}&amp;quot;&amp;gt;{{{content4|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section5|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section5style}}}&amp;quot;&amp;gt;{{{section5}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content5|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content5style}}}&amp;quot;&amp;gt;{{{content5|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section6|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section6style}}}&amp;quot;&amp;gt;{{{section6}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content6|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content6style}}}&amp;quot;&amp;gt;{{{content6|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section7|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section7style}}}&amp;quot;&amp;gt;{{{section7}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content7|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content7style}}}&amp;quot;&amp;gt;{{{content7|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section8|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section8style}}}&amp;quot;&amp;gt;{{{section8}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content8|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content8style}}}&amp;quot;&amp;gt;{{{content8|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section9|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section9style}}}&amp;quot;&amp;gt;{{{section9}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content9|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content9style}}}&amp;quot;&amp;gt;{{{content9|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section10|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section10style}}}&amp;quot;&amp;gt;{{{section10}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content10|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content10style}}}&amp;quot;&amp;gt;{{{content10|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section11|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section11style}}}&amp;quot;&amp;gt;{{{section11}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content11|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content11style}}}&amp;quot;&amp;gt;{{{content11|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section12|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section12style}}}&amp;quot;&amp;gt;{{{section12}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content12|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content12style}}}&amp;quot;&amp;gt;{{{content12|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section13|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section13style}}}&amp;quot;&amp;gt;{{{section13}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content13|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content13style}}}&amp;quot;&amp;gt;{{{content13|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section14|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section14style}}}&amp;quot;&amp;gt;{{{section14}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content14|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content14style}}}&amp;quot;&amp;gt;{{{content14|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section15|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section15style}}}&amp;quot;&amp;gt;{{{section15}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content15|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content15style}}}&amp;quot;&amp;gt;{{{content15|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section16|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section16style}}}&amp;quot;&amp;gt;{{{section16}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content16|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content16style}}}&amp;quot;&amp;gt;{{{content16|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section17|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section17style}}}&amp;quot;&amp;gt;{{{section17}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content17|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content17style}}}&amp;quot;&amp;gt;{{{content17|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section18|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section18style}}}&amp;quot;&amp;gt;{{{section18}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content18|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content18style}}}&amp;quot;&amp;gt;{{{content18|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section19|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section19style}}}&amp;quot;&amp;gt;{{{section19}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content19|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content19style}}}&amp;quot;&amp;gt;{{{content19|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section20|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section20style}}}&amp;quot;&amp;gt;{{{section20}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content20|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content20style}}}&amp;quot;&amp;gt;{{{content20|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{footer|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-bottom-left-radius:.3em; border-bottom-right-radius:.3em; padding:.5em; {{{footerstyle}}}&amp;quot;&amp;gt;{{{footer}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Infobox core}}&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=62</id>
		<title>Template:Infobox core</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Template:Infobox_core&amp;diff=62"/>
		<updated>2026-07-01T21:37:30Z</updated>

		<summary type="html">&lt;p&gt;Brett: Created page with &amp;quot;Category:Metatemplates &amp;lt;includeonly&amp;gt;  &amp;lt;onlyinclude&amp;gt;&amp;lt;div style=&amp;quot;clear:both; float:{{{float|right}}}; width:{{{width|300px}}}; margin:0 0 1.3em 1.4em&amp;quot;&amp;gt;&amp;lt;!--  --&amp;gt;&amp;lt;div style=&amp;quot;background-color:#323232; border-radius:.3em; box-shadow:rgb(0 0 0 / 10%) 0 0 4px .1em; text-align:center&amp;quot;&amp;gt;&amp;lt;!-- --&amp;gt;{{#if:{{{header|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-top-left-radius:.3em; border-top-right-radius:.3em; padding-block:.5em; {{{headerstyle}}}&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;color:#fff; font-w...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Metatemplates]]&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&amp;lt;div style=&amp;quot;clear:both; float:{{{float|right}}}; width:{{{width|300px}}}; margin:0 0 1.3em 1.4em&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;div style=&amp;quot;background-color:#323232; border-radius:.3em; box-shadow:rgb(0 0 0 / 10%) 0 0 4px .1em; text-align:center&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{header|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-top-left-radius:.3em; border-top-right-radius:.3em; padding-block:.5em; {{{headerstyle}}}&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;color:#fff; font-weight:bold; font-size:132%; padding:0;&amp;quot;&amp;gt;{{{header}}}&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{image|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image|}}}|{{{imagetooltip|}}}|{{{imagewidth|{{{width|300px}}}}}}{{#if:{{{imagelink|}}}|{{!}}link={{{imagelink}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{image2|}}}|&amp;lt;div style=&amp;quot;background-color:#363636;&amp;quot;&amp;gt;[[File:{{{image2|}}}|{{{imagetooltip2|}}}|{{{imagewidth2|{{{width|300px}}}}}}{{#if:{{{imagelink2|}}}|{{!}}link={{{imagelink2}}}|}}]]&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section1|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section1style}}}&amp;quot;&amp;gt;{{{section1}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content1|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content1style}}}&amp;quot;&amp;gt;{{{content1|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section2|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section2style}}}&amp;quot;&amp;gt;{{{section2}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content2|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content2style}}}&amp;quot;&amp;gt;{{{content2|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section3|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section3style}}}&amp;quot;&amp;gt;{{{section3}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content3|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content3style}}}&amp;quot;&amp;gt;{{{content3|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section4|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section4style}}}&amp;quot;&amp;gt;{{{section4}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content4|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content4style}}}&amp;quot;&amp;gt;{{{content4|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section5|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section5style}}}&amp;quot;&amp;gt;{{{section5}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content5|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content5style}}}&amp;quot;&amp;gt;{{{content5|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section6|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section6style}}}&amp;quot;&amp;gt;{{{section6}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content6|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content6style}}}&amp;quot;&amp;gt;{{{content6|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section7|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section7style}}}&amp;quot;&amp;gt;{{{section7}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content7|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content7style}}}&amp;quot;&amp;gt;{{{content7|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section8|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section8style}}}&amp;quot;&amp;gt;{{{section8}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content8|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content8style}}}&amp;quot;&amp;gt;{{{content8|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section9|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section9style}}}&amp;quot;&amp;gt;{{{section9}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content9|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content9style}}}&amp;quot;&amp;gt;{{{content9|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section10|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section10style}}}&amp;quot;&amp;gt;{{{section10}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content10|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content10style}}}&amp;quot;&amp;gt;{{{content10|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section11|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section11style}}}&amp;quot;&amp;gt;{{{section11}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content11|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content11style}}}&amp;quot;&amp;gt;{{{content11|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section12|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section12style}}}&amp;quot;&amp;gt;{{{section12}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content12|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content12style}}}&amp;quot;&amp;gt;{{{content12|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section13|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section13style}}}&amp;quot;&amp;gt;{{{section13}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content13|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content13style}}}&amp;quot;&amp;gt;{{{content13|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section14|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section14style}}}&amp;quot;&amp;gt;{{{section14}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content14|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content14style}}}&amp;quot;&amp;gt;{{{content14|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section15|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section15style}}}&amp;quot;&amp;gt;{{{section15}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content15|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content15style}}}&amp;quot;&amp;gt;{{{content15|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section16|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section16style}}}&amp;quot;&amp;gt;{{{section16}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content16|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content16style}}}&amp;quot;&amp;gt;{{{content16|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section17|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section17style}}}&amp;quot;&amp;gt;{{{section17}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content17|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content17style}}}&amp;quot;&amp;gt;{{{content17|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section18|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section18style}}}&amp;quot;&amp;gt;{{{section18}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content18|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content18style}}}&amp;quot;&amp;gt;{{{content18|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section19|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section19style}}}&amp;quot;&amp;gt;{{{section19}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content19|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content19style}}}&amp;quot;&amp;gt;{{{content19|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{section20|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; padding-block:.5em; {{{section20style}}}&amp;quot;&amp;gt;{{{section20}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#if:{{{content20|}}}|&amp;lt;div style=&amp;quot;background-color:#303030; max-width:{{{width|300px}}}; padding-inline:.5em; padding-block:.5em; {{{content20style}}}&amp;quot;&amp;gt;{{{content20|}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;{{#if:{{{footer|}}}|&amp;lt;div style=&amp;quot;background-color:#232323; border-bottom-left-radius:.3em; border-bottom-right-radius:.3em; padding:.5em; {{{footerstyle}}}&amp;quot;&amp;gt;{{{footer}}}&amp;lt;/div&amp;gt;|}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=61</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=61"/>
		<updated>2026-07-01T02:31:44Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCircuitFixPNG.png|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Final Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Final Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=File:ExampleCircuitFixPNG.png&amp;diff=60</id>
		<title>File:ExampleCircuitFixPNG.png</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=File:ExampleCircuitFixPNG.png&amp;diff=60"/>
		<updated>2026-07-01T02:31:27Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ExampleCircuitFixPNG&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=59</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=59"/>
		<updated>2026-07-01T02:23:58Z</updated>

		<summary type="html">&lt;p&gt;Brett: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCir.svg|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Final Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Final Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
	<entry>
		<id>https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=58</id>
		<title>Transfer Function Solving Process w/ Example</title>
		<link rel="alternate" type="text/html" href="https://brettczeto.ca/index.php?title=Transfer_Function_Solving_Process_w/_Example&amp;diff=58"/>
		<updated>2026-07-01T02:12:05Z</updated>

		<summary type="html">&lt;p&gt;Brett: transfer function solving process&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Base KVL / KCL Equations: ==&lt;br /&gt;
[[File:ExampleCircuitFix.svg|thumb]]&lt;br /&gt;
&#039;&#039;&#039;KVL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Vin - Vc1 - Ir1*R1 - Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Vc2 + Ir2*R2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;KCL Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;-Ir1 + Ic1 = 0&#039;&#039;&lt;br /&gt;
# &#039;&#039;-Ir2 + Ic1 - Ic2 = 0&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additional Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;Ic1 = s*C1*Vc1&#039;&#039;&lt;br /&gt;
# &#039;&#039;Ic2 = s*C2*Vc2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing Reduced Equation Set: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
syms Ir1 Ir2 Ic1 Ic2 Vc1 Vc2 Vin R1 R2 C1 C2 s&lt;br /&gt;
&lt;br /&gt;
equs = [Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
    -Vc2 + Ir2*R2 == 0;&lt;br /&gt;
    -Ir1 + Ic1 == 0;&lt;br /&gt;
    -Ir2 + Ic1 - Ic2 == 0];&lt;br /&gt;
&lt;br /&gt;
vars = [Vin Vc1 Vc2 Ir1 Ir2 Ic1 Ic2];&lt;br /&gt;
&lt;br /&gt;
[A, b] = equationsToMatrix(equs, vars);&lt;br /&gt;
&lt;br /&gt;
equ1 = A(1,:)*vars.&#039; == b(1,:);      %equ1 = Vin - Vc1 - Ir1*R1 - Ir2*R2 == 0;&lt;br /&gt;
equ2 = A(2,:)*vars.&#039; == b(2,:);      %equ2 = - Vc2 + Ir2*R2 == 0;&lt;br /&gt;
equ3 = A(3,:)*vars.&#039; == b(3,:);      %equ3 = - Ir1 + Ic1 == 0;&lt;br /&gt;
equ4 = A(4,:)*vars.&#039; == b(4,:);      %equ4 = - Ir2 + Ic1 - Ic2 == 0;&lt;br /&gt;
&lt;br /&gt;
equ5 = Ic1 == s*C1*Vc1;&lt;br /&gt;
equ6 = Ic2 == s*C2*Vc2;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MATLAB Code for Computing the Transfer Function: ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
sol = solve([equ1,equ2,equ3,equ4,equ5,equ6], [Ir1,Ir2,Ic1,Ic2,Vc1,Vc2])&lt;br /&gt;
&lt;br /&gt;
Hout = simplify(sol.Vc2/Vin)&lt;br /&gt;
&lt;br /&gt;
syms R C&lt;br /&gt;
&lt;br /&gt;
Hout_Homo = subs(Hout, {R1,R2,C1,C2}, {R,R,C,C}) %Assuming R1=R2 and C1=C2.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;Final Transfer function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(s) = \frac{C_1 R_2 s}{C_1 C_2 R_1 R_2 s^2 + C_1 R_1 s + C_1 R_2 s + C_2 R_2 s + 1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Final Homogeneous Transfer Function:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_h_o_m_o(s) = \frac{C R s}{C^2 R^2 s^2 + 3 C R s + 1}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brett</name></author>
	</entry>
</feed>