Question

Use matlab

In the comnmand window, if we enter 2. a-87 a-123 a Then the output of the last line is 3. The output of the last line is A 5

0 0
Add a comment Improve this question Transcribed image text
Answer #1

2.

Command Window New to MATLAB? See resources for Getting Started = 87 87 > a = 123 a 123 >>a a = 123 f>>

last assigned value to a is 123 hence output of last line is a=123

3.

Command Window New to MATLAB? See resources for Getting Started >>A=5; >>if A<-6 B-7; else B 9 end >>B 7

Output of last line is B=7 because A(=5)<6

4. The operator ~= stands for

A)Not equal to

5.

Command Window New to MATLAB? See resources for Getting Started >>Q 5 >>T 2 >> if (Q>TIQ>8) & (T<-4) R-Q* T end >> if (T-01Q=

Output of last line is R=5.

Add a comment
Know the answer?
Add Answer to:
Use matlab In the comnmand window, if we enter 2. a-87 a-123 a Then the output of the last line is 3. The output of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1 a - int(input("Enter a: ")) 2 b - int(input("Enter b: ")) 3 C = int(input("Enter...

    1 a - int(input("Enter a: ")) 2 b - int(input("Enter b: ")) 3 C = int(input("Enter c: ")) 4 5 # calculate xi and x2 6 x1 - (binath.sqrt(b**2-4'a'c))/2*a 7 M2 - (-b-math. sqrt(b2-4a'c))/2a 8 9 print("x1:",x1) 10 print("x2:",x2) 1: Compare output 1 A 0/6 Traceback (most recent call last): File "main.py", line 6, in <module> x1 - (-b+math.sqrt (b**2-4*a*c))/2a NameError: name "math' is not defined 5 Input 6 1 Your output Enter a: Enter b: Enter C! Your output...

  • second picture is output of the mathlab code Important Note: For testing of this part of the assignment, the automatic printing of values in the com mand window must not be used. Please make sure...

    second picture is output of the mathlab code Important Note: For testing of this part of the assignment, the automatic printing of values in the com mand window must not be used. Please make sure you put semicolon ω at the end of each line. For this part your program should perform following tasks 1. Create a Matrix A. Show the contents of matrix A to command window with the title Matrix A:". The Matrix A should be defined as...

  • There are a number of changes that we need to make: 1) We need to take...

    There are a number of changes that we need to make: 1) We need to take the board size (width and height) as command line parameters. If these are not specified, we should print out a message informing the user how to call the program. 2) We need to initialize a game board. Allocate memory, decide if each square has bombs, and count the squares surrounding that have bombs. 3) We need to free the game board. Because we need...

  • MATLAB Define the following computer programming terms and give an example of each. MATLAB example Sequence...

    MATLAB Define the following computer programming terms and give an example of each. MATLAB example Sequence Selection structure- Repetition structure - Relational operators (True = 1, False = 0) Logical operators (True = 1, False =0) And Or Less than Less than or equal to Greater than Greater than or equal to Equal to Not equal to Not ans ans Type the following relational operator commands into MATLAB in the command window one at a time. Write the results to...

  • 2. A. Write a MATLAB code to plot the function ?(?) = 4 − ? ^2...

    2. A. Write a MATLAB code to plot the function ?(?) = 4 − ? ^2 * ? ^−3? for the time range 0 ≤ ? ≤ 3 seconds. Plot the function using the following two methods: I. Use MATLAB’s colon operator and vector operations. II. Use iterations (for-loop) and scalar operations. B. Let ? = −3, 1, 5, … ,21. I. Find the summation of the elements of ? that are greater than the 4 ?ℎelement and less than...

  • Need help with this Matlab program %% Exercise 1 % NOTE: Please suppress output--i.e., use a...

    Need help with this Matlab program %% Exercise 1 % NOTE: Please suppress output--i.e., use a semicolon ';' at the end of any % commands for which the output is not necessary to answer the question. % Delete these notes before turning in. % Define input variable theta as discretized row vector (i.e., array). theta = ??; % Define radius. r = ??; % Define x and y in terms of theta and r. x = ??; y = ??;...

  • C++ Write a program that takes in 3 inputs [players (int type), expected game time (double...

    C++ Write a program that takes in 3 inputs [players (int type), expected game time (double type), team (char type) and calculates actual game time (double) based on the following conditions: if the number of players or the expected game time is less than or equal to ZERO, it should output Wrong input if the number of players is greater than 0 and less than or equal to 6 and if they are on the 'R' or 'r' team, their...

  • We use JAVA. Thanks.    Create an application whose main method asks the user to enter...

    We use JAVA. Thanks.    Create an application whose main method asks the user to enter an n by m integer matrix that contains nm integer numbers. n and m should be between 1 and 10. If the user enters a             number less than 1 or greater than 10, the program will continue to ask the user to enter an integer number between 1 and 10. The program should print the sum of the boundary elements of the matrix....

  • Newton's Method in MATLAB During this module, we are going to use Newton's method to compute...

    Newton's Method in MATLAB During this module, we are going to use Newton's method to compute the root(s) of the function f(x) = x° + 3x² – 2x – 4 Since we need an initial approximation ('guess') of each root to use in Newton's method, let's plot the function f(x) to see many roots there are, and approximately where they lie. Exercise 1 Use MATLAB to create a plot of the function f(x) that clearly shows the locations of its...

  • matlap Question 1 1. Consider the following Matlab program 5 - (2 < 3) & (C2...

    matlap Question 1 1. Consider the following Matlab program 5 - (2 < 3) & (C2 > 3) 1 (1 - 0)) What is the final value of s? A. True B. *1 CO D. false 2- Which expression tests whether variable x is between (but not the same as) the values 5 and 10 (a) 5 <x< 10 (b) 5 <= x <= 10 (c) 5 < X & X > 10 (d) x < 10 & 5 <...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT