Subsequent statements set every element of matrix, Computer Engineering

Assignment Help:

Q. Subsequent statements set every element of matrix?

Let a= [2,4,6,8,10], b=[1,3,5,7,9], c=[0,0,0,0,0]

Consider the subsequent program section

FORALL (i = 2:4)

  a(i) = a(i-1)+a(i+1)

  c(i) = b(i) *a(i+1).

END FORALL

The calculations would be:

   a[2] =a[1]+a[3] =2+6=8

   a[3] =a[2]+a[4] =4+8=12

   a[4] =a[3]+a[5] = 6+10=16

   c[2] = b[2] *a[3] = 3*12=36

   c[3] = b[3] *a[4] = 5*16=80

   c[4] = b[4] *a[5] =7*10=70

So output is

a= [2,8,12,16,10], b=[1,3,5,7,9], c=[0,36,80,70,0]


Related Discussions:- Subsequent statements set every element of matrix

Diffrentiate between non-relocatable & relocatable programs, How non-reloca...

How non-relocatable programs are different from relocatable programs? Non relocatable program: It is one that cannot be made to execute in any type of area of storage other t

Scoreboards- constrained-random verification methodology, Scoreboards- Cons...

Scoreboards- Constrained-Random Verification Methodology Scoreboards are used to verify that data has successfully reached its destination whereas monitors snoop the interfaces

8086, the block diagram of an 8086 processor

the block diagram of an 8086 processor

Assembly program, where do i get some sample assembly projects (with coding...

where do i get some sample assembly projects (with coding included)?

Explain about the acoustic tablet, Explain about the Acoustic tablet Ac...

Explain about the Acoustic tablet Acoustic (or sonic) tablet use sound waves to detect a stylus position. Either strip microphones or point microphones can be used to detect th

Associative memory organisations, Associative Memory Organisations The ...

Associative Memory Organisations The associative memory is organised in w words with b bits per word. In w x b array, every bit is known a cell. Each cell is made up of a flip-

Ellipse follows the perimeter of the window, A) Execute a program where an ...

A) Execute a program where an ellipse follows the perimeter of the window. B)  Execute a program that can draw graphs, possibly following your plan from last week. Have it graph

What are the events used for page headers and footers, What are the events ...

What are the events used for page headers and footers? The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.

Design a 1-bit full adder, Design a 1-bit full adder: Verify your desig...

Design a 1-bit full adder: Verify your design Use the 1-bit full adder to build a 4-bit adder with Ci=0 Verify: 1 + 4, and 9 + 9 Sram design: Cell: p - 0.5/0.045;

Show the layout of dvorak-dealey keyboard, Q. Show the layout of Dvorak-Dea...

Q. Show the layout of Dvorak-Dealey keyboard? This was one keyboard layout designed to be a challenger to QWERTY layout. This was designed by August Dvorak and William Dealey a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd