Input function to prompt the user to enter a square

Assignment Help Basic Computer Science
Reference no: EM13165848

A two dimensional square array is considered to be symmetric if for every row (r) and column(c) index/subscript Arc = Acr. For example in the following two arrays A is symmetric because A12 = A21, A13 = A31, and A23 = A32 whereas B is not symmetric because B13 does not equal B31 A=[4 2 3; 2 5 6; 3 6 9] B=[6 7 2;7 8 1;3 1 5]

  • Create a MATLAB function that will accept a two-dimensional square and the function input and will send back true or false to the function call. The function should employ a nested loop to compare elements of the array and determine if the array is symmetric or not. The function may not include any built-in function other than the length (also remember that break and continue are not permitted to be used in this course), you will receive an automatic zero for this problem if you fail to follow this instruction. Note MATLAB has a predefined value of 1 for the word true and 0 for the word false that you may find useful.
  • In the script file, use the input function to prompt the user to enter a square 2-dimensional array. Use a loop to check that user's input is a square array and repeatedly ask the user to enter a square array until they enter a square array (you may use the size function for this check). Once a square array the script file should call the function with the square array. Then the script file should output the array and a message if it was symmetric or not.

Reference no: EM13165848

Questions Cloud

Strengths and weaknesses of using per capita national income : Critically discuss the strengths and weaknesses of using per capita national income (even once adjusted for purchasing power parity) as a measure of welfare.  Discuss at least two alternative measures of national welfare that have been put forward? ..
Program to compute each semester tuition for each student : write a program to compute each semester the tuition for each student. Studient is taking 12 credit or less, tuition is 675 oer credit if student is taking more than 12 credits the total tuition is 6300.
Your city''s parking violation : Your city's Parking Violation Bureau wants you to write a program to compute fines for parking violations.
What information do you need to be able to retrieve : What information do you need to be able to retrieve every record from a hashed file in ascending key order?
Input function to prompt the user to enter a square : In the script file, use the input function to prompt the user to enter a square 2-dimensional array. Use a loop to check that user's input is a square array and repeatedly ask the user to enter a square array until they enter a square array (you m..
Approximate the volume of cheese in a rectangular hunk : You will create a program that will approximate the volume of cheese in a rectangular hunk of Swiss cheese. For this approximation you will assume that the holes in the Swiss cheese are of two types: spherical bubbles (all of the same size) or cyl..
Each of the conditional jump statements causes a jump to des : Assume for each part of this problem that the EAX register contains 00 00 00 4F and the doubleword referenced by value contains FF FF FF 38.
Java program that reads an input : Create a java program that reads an input of n lines with the first line being the number of people in the contest and the remaining lines a numeric 9 digit code for each person that gets a vote
Write a program in c# that creates a professorrating class : Write a program in C# that creates a ProfessorRating class consisting of professor ID and three ratings. The three ratings are used to evaluate easiness, helpfulness, and clarity.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explaining costs are classified as opex or capex

The managers of the five business units. They will need to know the following about each option in terms that nontechnical staff can readily understand: Whether the costs are classified as opex or capex.

  What is meant by artificial intelligence

What is meant by artificial intelligence? What are two essential differences between human brains and the central processing unit of a computer.

  Prove by induction of recurrence relation has solution

Describe why Kim's recurrence relation is correct. Prove by induction that Kim's recurrence relation has solution: M(k) = 3^(k - 1).

  Compare how the gestures data is generated and represented

Analyze the accuracy of the input generated by each of the following input devices compared to electrical signals based methods of processing

  Describing use of request for information

Describe in scholarly detail how you would utilize RFI (Request For Information) procedures to recognize potential vendors in the acquisition process, and RFQ.

  Describing fields and options with user account set-up

Describe the fields and options associated with user account set-up.

  Describe the concept of form follows function

Describe the concept of "Form Follows Function" as it pertains to the three main areas of design (FAB). Recognize ways in which portfolio designer works within limitations of media technology (Functionality).

  Explaining mismatched file headers to extensions

What procedures would you require to follow to retrieve evidence? Identify mismatched file headers to extensions.

  Describe graphical user interfaces-communications message

Describe some of the graphical user interfaces (GUIs) and communications messages that occur during operation of a microwave.

  Software engineering procedure

Can correctness proving solve the problem that the product as delivered to the customer may not be what the consumer really requires?

  Using the expand, guess, and verify method find closed

Using the expand, guess, and verify method find closed form solutions for the following recurrence relations.

  Design hardware-software driver processor-peripheral device

Design the hardware and software driver that will implement a byte-wide data transfer from your processor to a peripheral device.

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