Skip to content

Doing Math with Lua. This package aims to collect all general purpose packages that can run from standard latest Lua distribution to use as a powerful math package.

Notifications You must be signed in to change notification settings

aryajur/LuaMath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuaMath

Introduction

This is a package to collect, maintain and create functionality to allow the standard latest Lua interpreter and other software that embed Lua to be used as a Mathematical package. It is not limited to just numerical manipulations but also symbolic equation manipulations, plots and anything related.

Pre-requisites

Usage

All code file to use Lua Math should be placed in the root directory and should require LuaMath file which adds the proper path and cpath to the lua interpreter paths to find the required modules

Bode Plot example

require("LuaMath")
local plot = require "lua-plot" 

function func(s)
	return 1000/((1+s)*(1+s/100))
end

local bp = plot.bodePlot{
	func = func,
	ini = 0.01,
	finfreq = 1000,
	steps = 20
}

bp.mag:Show({title="Magnitude Plot",size="HALFxHALF"})
bp.phase:Show({title="Phase Plot",size="HALFxHALF"})

References

About

Doing Math with Lua. This package aims to collect all general purpose packages that can run from standard latest Lua distribution to use as a powerful math package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages