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

What are the counters, What are the Counters? 1. The Counter is a seque...

What are the Counters? 1. The Counter is a sequential circuit which consists of a set of flip flops connected in a appropriate manner to count the sequence of input pulses.

State the concept of hierarchy in object oriented, Hierarchy Hierarchy...

Hierarchy Hierarchy is a process of ranking or ordering of abstraction. Hierarchy is decided by the help of 'divide and conquer' principle. Complex objects can be described

Types of reasoning - first-order logic, Types of reasoning - First-order lo...

Types of reasoning - First-order logic: Atleast five types of reasoning can be acknowledged here. • Firstly, why and how do we will think for the killer usually left a silk

DoDAF OV-2 for a green datacenter, How do I create a DoDAF OV-2 for the con...

How do I create a DoDAF OV-2 for the construction of a green data center?

Layered architecture of edi, Layered Architecture of EDI: EDI is most c...

Layered Architecture of EDI: EDI is most commonly applied in the implementation and settlement phases of the trade cycle. In implementation of a simple trade exchange, the cust

Difference between classical ai and statistical ai, Statistical AI, arising...

Statistical AI, arising from machine learning, tends to be more concerned with "inductive" thought: given a set of patterns, make the trend. Classical AI, on the other hand, is mor

Explain about truth table and logic diagram, Q. Explain about truth table a...

Q. Explain about truth table and logic diagram? A Boolean function can be realized in a logic circuit employing the basic gates: - AND, OR & NOT. Concern here for illustration

Performance instrumentation, The performance instrumentation states on how ...

The performance instrumentation states on how to efficiently gather information about the computation of the parallel computer. The process of instrumentation mainly attempts to ca

What is input-output processors, Q. What is Input-output processors? le...

Q. What is Input-output processors? let's briefly summarize the development in area of input/output functions. These can be briefed as below: 1. CPU directly controls a peri

Determine the decimal equivalent of hexadecimal number, The hexadecimal num...

The hexadecimal number for (95.5) 10 is ? Ans. (95.5) 10 = (5F.8) 16 Integer part Fractional part 0.5x16=8.0

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