Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:53 16 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MATH Matrix Commands

Author Message
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 478
Posted: 11:24am 20 Nov 2020
Copy link to clipboard 
Print this post

Adding the matrix commands to MMBASIC was a good idea. Are there any plans to add

MATH M_INVERT, MATH M_ADD and MATH M_READ?

These would eliminate a lot of programming and loops in some programs.

option base 1
dim a(2,2)
math m_read a()
data 1,5,8,2
print"Output:"
math m_print a()

Output:
1, 5
8, 2
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 528
Posted: 03:36pm 20 Nov 2020
Copy link to clipboard 
Print this post

Indeed. And the same for vector.

Another command that can be very useful is math v_slice or v_copy


Option base 0

Dim s(4)=(1,2,3,4,5)
Dim d(2)

Math v_slice v(), 1, d()


The second argument is the position from de source vector to start copying the data.

D will be (2,3,4).
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025