Skip to main content
1-Visitor
Mar 31, 2018 10:41 PM UTC
Solved

How to use Kronecker Delta?

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!

LucMeekesAnswer
23-Emerald V
Apr 1, 2018 7:29 AM UTC

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

12 replies

terryhendicott
21-Topaz II
Apr 1, 2018 1:34 AM UTC

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.

 

Translate
MarianoC1-VisitorAuthor
1-Visitor
Apr 1, 2018 1:48 AM UTC

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

Look:

 

 

Translate
terryhendicott
21-Topaz II
Apr 1, 2018 2:45 AM UTC

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

Translate
LucMeekes23-Emerald VAnswer
23-Emerald V
Apr 1, 2018 7:29 AM UTC

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

Translate
Werner_E
25-Diamond I
Apr 1, 2018 12:40 PM UTC

Just to summarize what Luc and Terry already have written:

Bild.png

Translate
terryhendicott
21-Topaz II
Apr 1, 2018 2:37 PM UTC

Hi,

 

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

 

Translate
MarianoC1-VisitorAuthor
1-Visitor
Apr 1, 2018 10:45 PM UTC

Could you convert it to Prime 3.0 or lower?

Thanks!

Translate