write a vb script to add two 2*2 matrix

Answer Posted / pawan

Dim oArray1(1,1)
Dim oArray2(1,1)
Dim tArray(1,1)
oArray1(0,0)=8
oArray1(0,1)=9
oArray1(1,0)=5
oArray1(1,1)=-1
oArray2(0,0)=-2
oArray2(0,1)=3
oArray2(1,0)=4
oArray2(1,1)=0
tArray(0,0)=oArray1(0,0)* oArray2(0,0)+ oArray1(0,1)* oArray2(1,0)
tArray(0,1)=oArray1(0,0)* oArray2(0,1)+ oArray1(0,1)* oArray2(1,1)
tArray(1,0)=oArray1(1,0)* oArray2(0,0)+ oArray1(1,1)* oArray2(1,0)
tArray(1,1)=oArray1(1,0)* oArray2(0,1)+ oArray1(1,1)* oArray2(1,1)

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to increasing the numbers in a given text box please write a vb script

1702


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2583


Which operator can be used to do an xor operation in vbscript?

680


What is sql loader? Explain the files used by sql loader to load file?

622


Explain some uses of vb script?

553






Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

2034


How will you compare two strings in vbscript?

594


How will you convert a string to lower case string using vbscript?

557


How will you convert a string to upper case string using vbscript?

551


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

1614


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

1661


What is purpose of scripting.filesystemobject class in vbscript?

627


What is vbscript procedures?

602


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

576


Explain sga memory structures?

579