473,603 Members | 2,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need this code

I need code to compute the determinant and inverse of a matrix. for
example the determinant and inverse of:

[1 2 3 0]
[4 5 6 1]
[7 8 9 2]
[0 1 2 3]

Jul 23 '05 #1
6 1358
You need to isolate parameters first.

that is make it valid as
you would with paper/pencil and a brain only.

var obj = []
obj[0] = [1, 2, 3, 0]
obj[1] = [4 ,5, 6, 1]
obj[2] = [7 ,8, 9, 2]
obj[3] = [0 ,1, 2, 3]

Now this can bee "seen"

-> alert( obj )

----------------

determinant means exactly that
a matrix it becomes automatically
anything inverse can be derived

Hope that helps STUPID


"greenflame " <al*********@ya hoo.com> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
I need code to compute the determinant and inverse of a matrix. for
example the determinant and inverse of:

[1 2 3 0]
[4 5 6 1]
[7 8 9 2]
[0 1 2 3]


Jul 23 '05 #2
greenflame wrote:
I need code to compute the determinant and inverse of a matrix.
Then write code to do it. Then post your best attempt.
for example the determinant and inverse of:

[1 2 3 0]
[4 5 6 1]
[7 8 9 2]
[0 1 2 3]


Looks more like your homework. Is it?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #3
This is for a project of mine to make a mini mathematica. I will try to
do it but I am not sure if you all will understand the matrix math.

Jul 23 '05 #4
greenflame wrote:
This is for a project of mine to make a mini mathematica. I will try to
do it but I am not sure if you all will understand the matrix math.


.... so you asked us to write the code to do the math that you don't
think we'd understand?

Now that I don't understand.

Keep me posted, though. I am curious.

Jul 23 '05 #5
greenflame wrote:
This is for a project of mine to make a mini mathematica. I will try to
do it but I am not sure if you all will understand the matrix math.


This link (on the Wolfram site) provides a general method for
finding the determinant of an n_x_n matrix.

<URL:http://mathworld.wolfr am.com/Determinant.htm l>
The "expansion by minors" technique is explained here:

<URL:http://mathworld.wolfr am.com/DeterminantExpa nsionbyMinors.h tml>
No doubt you can develop a specific solution for a 4x4 matrix and
hard-code that, or you could produce a general solution that finds the
determinant of any size square matrix. Depending on how you wish to
approach this, the solution will be very different.

You will likely get more assistance if you provide an algorithm that
you are trying to implement, that way you will get input from those
whose forte is optimisation of JavaScript regardless of whether they
understand the mathematics involved (and don't presume they don't).

I played with Mathematica some years ago - had I been able to apply all
the mathematical knowledge I have ever learned (or even stumbled
across), I doubt that I would even have scratched the surface of its
considerable capabilities.

Good luck in your quest!
--
Rob
Jul 23 '05 #6
Thanks Rob I will check those sites out. And I will keep you posted.

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2636
by: Beach Potato | last post by:
Dear Y'all: I'm about to start porting a big old project written in anscient version of Delphi to something more stable, robust, supportable and maybe even portable. Since I haven't seriously touched C for large implementations, I'm seeking advice on what to use for development. My ultimate goal is to spend as less time on it as possible. I'll be writing it in Windows 32-bit environment, probably Win2000 or Win98. Planning to use a...
15
3667
by: drdoubt | last post by:
using namespace std In my C++ program, even after applying , I need to use the std namespace with the scope resolution operator, like, std::cout, std::vector. This I found a little bit cumbersome to always include std. I somewhere found a trick to overcome this problem. By using using std::cout;
19
4083
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
11
2791
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field (strPubCity) for Publisher City. These two fields have a many-to-one relationship with tables, (tlkpPubName and tlkpPubCity) respectively. The lookup tables only have one field (strPubName and strPubCity), which is their primary key. I also have...
7
3296
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
48
3216
by: Chad Z. Hower aka Kudzu | last post by:
A few of you may recognize me from the recent posts I have made about Indy <http://www.indyproject.org/indy.html> Those of you coming to .net from the Delphi world know truly how unique and "huge" Indy is both as a project, in support, development, and use. But Indy is new to the .net world. Indy is a HUGE library implementing over 120 internet protocols and standards and comes with complete source. Its an open source project, but not...
4
7394
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is there are multiple pages per invoice. How can I grab the data, make the TIF, place it on the client and then Open with the clients default program for veiwing TIF's (usually Microsoft Picture and Fax Viewer). Please help.
4
2744
by: Quas.co.ua | last post by:
Hello all. I need your help. I need C compler to make demo of some technologie. This C compiler I need to write program which after run will be located in one segment of memory and it generates another code an write it into another (second) segment. And after some fragment of code is generated program from first segment runnes just generated code from second segment which may return in first
9
2185
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but that has problems. FullName=Request.Form("Name") Email=Request.Form("Email") GivenName=Request.Form("GivenName")
20
4250
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
0
7996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8415
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8060
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8273
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1514
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.