Skip to main content
1-Visitor
March 31, 2018
Solved

How to use Kronecker Delta?

  • March 31, 2018
  • 3 replies
  • 7773 views

I want to create a matrix using a little program with Kronecker Delta (1 if i=j, 0 if not) however it does not work.

Commands

Where is the mistake?

Thanks!

Best answer by LucMeekes

Kronecker delta is a function in Mathcad/Prime, so it needs to be called with parameters 'delta(i,j)'  rather than with indices 'delta[i,j'.

I can't open your sheet (unrar produces an error message), but I should guess that Prime's error message is that delta is undefined...?

 

Success!

Luc

3 replies

21-Topaz II
April 1, 2018

Hi,

 

You do not need to increase "j" it happens automatically,

You have return statement for D in the first for loop not outside it.

 

MarianoC1-VisitorAuthor
1-Visitor
April 1, 2018

f.pngOk, but the Kronecker delta is well used?

Look:

 

 

21-Topaz II
April 1, 2018

Hi,

The return of D needs to be outside of the for loops

You can use identity matrix for Kronecker Delta

 

 

Please attach your worksheet to clarify your problem.

You may have to zip it first. A serious bug in this forum often prevents from attaching a mathcad file. In Windows Explorer click with the right-mouse button on the mathcad file and select 'Send to' -> 'Compressed (zipped) folder'. The resulting .zip file can be attached

LucMeekes23-Emerald IVAnswer
23-Emerald IV
April 1, 2018

Kronecker delta is a function in Mathcad/Prime, so it needs to be called with parameters 'delta(i,j)'  rather than with indices 'delta[i,j'.

I can't open your sheet (unrar produces an error message), but I should guess that Prime's error message is that delta is undefined...?

 

Success!

Luc

25-Diamond I
April 1, 2018

Just to summarize what Luc and Terry already have written:

Bild.png

21-Topaz II
April 1, 2018

Hi,

 

You do not need to program it, just use matrix manipulation will do in one step

 

MarianoC1-VisitorAuthor
1-Visitor
April 1, 2018

Could you convert it to Prime 3.0 or lower?

Thanks!