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 resulting scheme is not ind-cpa-secure

Let a variant of CBC-mode encryption where sender simply increments the IV by 1 each time a message is encrypted. Illustrate that resulting scheme is not IND-CPA-secure.

  Indicates that the student id is abc54301

Indicates that the student ID is ABC54301 and the answer to question 1 is  True, the answer to question 2 is False, and so on. This student did not  answer question 9. The exam has 20 questions, and the class has more than  150 students. Each corre..

  Prediction for open standards that may change world again

In April of 1990, entire concept of domain was born, and email addresses "opened up". What might be the prediction about more open standards which may change our world again?

  Use map to define convert-euro converts list of us dollars

Use map to define the following functions: convert-euro, which converts a list of U.S. dollar amounts into a list of euro amounts based on an exchange rate of 1.22 euro for each dollar.

  Kind of information monitor check to see if it sanitize

Which kind of information should the monitor check to see if it must sanitize the data to conceal the names of the users and the names and addresses of the computers involved?

  Prepare properties in ltl

Let a three bit binary counter. Prepare these properties in LTL. Create a model which satisfies the specification and both the above properties.

  Categorize the point-of-sale system in supermarket

Categorize the following systems and explain your classification: A point-of-sale system in a supermarket, A system which sends out reminders that magazine subscriptions are due to be paid.

  Multiplexing-modulation techniques-line of sight propagation

Write about Multiplexing and Modulation techniques in detail with respect to Line of Sight Propagation. What is meant by Geo stationary orbit? Write down the advantages of Geo synchronous satellites?

  How long will it take to reach steady-state value

Investigate the effect of the parameter b on y(t). To do this, plot y versus t for several values of b on the same plot. How long will it take for y(t) to reach 98 percent of its steady-state value?

  Business uses networks-computers-support business functions

Think about a business you are familiar with, one which urilizes networks and computers to support business functions. Make a list of ten important, specific items like computers, disks.

  Distinguish online learning with classroom learning

Write the exploratory essay in which you distinguish online learning with classroom (on-ground) learning. Your estimation may incorporate preparation time.

  Explain various kinds of storage devices

Explain what storage devices are, comprising the explanation of storage media. Write examples of at least three various kinds of storage devices.

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