observablehq / stdlib

The Observable standard library.
https://observablehq.com/@observablehq/standard-library
ISC License
966 stars 83 forks source link

Add mathjs to recommended libraries? #279

Closed dvd101x closed 3 months ago

dvd101x commented 2 years ago

I was reading the docs regarding Standard Library, at the end there is a suggestion to come here to discuss our favorite libraries so here I am.

As a mechanical engineer, by far my favorite library is mathjs in fact I'm using observable mostly because of the ease of importing that library.

I would love to find an integration with observable as mathjs helps to solve problems from very easy like 2 m/s to miles/h, some medium problems like matrix multiplication and very complex like the inverse of a matrix or solve a linear system of equations.

So it can be used as a sort of simplified matlab with a fantastic units handling. I can think of many examples where observable could benefit from mathjs specially for unit conversion, matrix operations simulating physical problems.

So here are my two cents just for consideration, thank you for your time.

I did some examples regarding:

dvd101x commented 1 year ago

Hi, thank you for looking into this, here is an other example for its use.

It shows an example of solving ODE, converting units and how to use it as a tool for plotting.

https://observablehq.com/@dvd101x/rocket-trajectory-optimization

dvd101x commented 1 year ago

Here is another example regarding a nicer method of solving ivp which makes it more similar to matlab.

https://observablehq.com/@dvd101x/rk54

dvd101x commented 1 year ago

And here is an implementation of the Lorenz Attractor using said method

https://observablehq.com/@dvd101x/lorenz-attractor Lorenz