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

  System development methodologies in information systems

There are literally thousands of system development methodologies in the Information Systems field. Suggest some reasons why there might be so many.

  Explain professional responsibility to complete installation

You are an engineer involved in the development of a financial system. During installations, you discover that this system will make a significant number of people redundant. It is your professional responsibility to complete the installation as..

  Develop an approach that will automatically integrate error

Develop an approach that will automatically integrate error messages and a user help facility. That is, the system would automatically recognize the error type and provide a help window with suggestions for correcting it. Perform a reasonably complet..

  To perform queries

To perform queries on a relational database system using SQL? To demonstrate an advanced knowledge of stored procedures, stored functions and triggers.

  Why chain of custody must be followed in investigation

You are a computer forensics investigator for a law firm. The firm acquired a new client, a young woman who was fired. What is chain of custody and why must it be followed in investigations?

  Create directories in home directory begin-mac-mac directory

Create following directories in your home directory cp_even, cp_mid,cp_iso,cp,thousand,cp_even. Examine files in the /usr/share/tcl8.3/encoding directory copy all files which begin with mac into mac directory.

  Explaining gui differences and security differences

With that being said, its great that each of you pointed out the GUI differences. What about the Security differences?

  First two training iterations of backpropagation algorithm

Consider a two-layer feedforward ANN with two inputs a and b, one hidden unit c, and one output unit d. This network has five weights (w,, web, wd, wdc, wdO), where w,o represents threshold weight for unit x

  Analyze hardware virtualization

Determine if you would prefer a virtualized environment to a non-virtualized environment for a midsized business or organization and explain why or why not. Compare the cloud computing cost models used by Amazon EC2 and Microsoft Azure.

  Explaining network attacker steal secure google cookies

Explain how a network attacker (an active attacker that can intercept or forge network packets, etc.) could steal secure google.com cookies.

  Advantage to process the data

You can write your program to next the loops in either direction, that is, process row by row or column by column. Explain which way you would choose to process the data. What is the advantage?

  Define a specialized representation language

Define a specialized representation language to describe the activities of a public library. This language will be a set of concepts and relations using conceptual graphs. Do the same thing for a retail business.

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