Write a function called maxsubsum that takes a matrix a

Assignment Help Data Structure & Algorithms
Reference no: EM13881103

Write a function called maxsubsum that takes a matrix A as an input, computes the sum of elements in each of its submatrices, and finds the submatrix that has the maximum sum. (For the purposes of this exercise, we define a submatrix as a matrix formed by a contiguous set of elements of the original matrix.) If there are more than one with the same maximum sum, the function can pick any one of them. Note that the entire matrix is considered to be a submatrix of itself, but because some elements of the matrix may be negative, it may not have the maximum sum. The function is defined like this:function [row,col,numrows,numcols,summa] = maxsubsum(A)where row and col specify the indexes of the top left corner of the submatrix with the maximum sum, numrows and numcols are its dimensions, and summa is the sum of its elements.

Reference no: EM13881103

Questions Cloud

Write a program that prompts the user to input a string : Write a program that prompts the user to input a string. The program then uses the function substr to remove all the vowels from the string.
Explain microloans and the management team : Explain microloans and the management team
Causation is fundamental to epidemiology : Demonstrate an understanding that causation is fundamental to epidemiologyExplain and apply criteria for considering causation, including temporal relation, plausibility, consistency, strength, dose-response relationship, reversibility, study design,..
Find and compare two state statutes : Several states in the United States, including Wisconsin, Vermont, and Minnesota, also have such legislation. Many states require certain persons to report speci?c kinds of crimes, most often child abuse. Find and compare two state statutes.
Write a function called maxsubsum that takes a matrix a : Write a function called maxsubsum that takes a matrix A as an input, computes the sum of elements in each of its submatrices, and finds the submatrix that has the maximum sum
What unique problems underlie cross-cultural communication : What unique problems underlie cross-cultural communication? What are some common barriers to effective communication
Find the maximum temperature in the wire : A copper wire, 5 mm in diameter and 15 ft long, has a voltage drop of 0.6 volts. Find the maximum temperature in the wire if the ambient air temperature is 25°C and the heat transfer coefficient h is 5.7 Btu/hr · ft2 · F.
First lincoln bank agreed to defer all payments : 1.At January 1, 2013, Rothschild Chair Company, Inc., was indebted to First Lincoln Bank under a $20 million, 10% unsecured note.
Determine the total budgeted cost for the project : Estimate the cost for each activity, using the schedule and schedule for web based reporting system project - Determine the total budgeted cost for the project.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Store the grades that you read in an arraylist

We expect the file to contain grades represented by integer values, one per line. If you encounter a value that is not an integer, you should throw an exception, print a message to the console, skip that value, and continue processing.

  Develop a business systems plan

Develop a Business Systems Plan (with full justification as to how these are applicable for the organisation) so as to accommodate mobile access to various services provided by the hospital.

  Calculate and display the cost per kilogram

You will need to design an application that will receive the weight of a parcel and calculate and display the cost per kilogram and the delivery charge for that parcel

  Show the brute-force attack against single des

Your task is to show that breaking the scheme is approximately as difficult as a brute-force attack against single DES.

  Describe ambiguity in proposed algorithm

Describe the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm. Describe how the use of primitives helps remove ambiguities in an algorithm's representation.

  How long would it take to fill the available storage space

How many cells can be in a computer's main memory if each cell's address can be represented by two hexadecimal digits? What if four hexadecimal digits are used? Explain your answer.

  Briefly describe what double hashing is

Briefly describe what double hashing is and describe what problem double hashing helps to resolve. Also, provide an example of a rule that can be used for a double hashing probe sequence

  Read in a height in feet and inches

Write a program that will read in a height in feet and inches (feet should be an integer, while inches should be a float) and will output the equivalent height in meters (as a float). Use at least three functions

  A program that performs depth first search in a graph

a program that performs Depth First Search in a graph

  Construct an entity-relationship model for the database

Construct an entity-relationship (ER) model for the database. Make sure you include in your model details of entities, relationships, attributes, keys and limits in participation.

  Describe implementation of algorithm on simd computer

Describe an implementation of that algorithm on an SIMD computer where the processors are connected to form a linear array

  Babylonian algorithm

Babylonian Algorithm. The Babylonian algorithm to compute the square root of a positive number n is as given:

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