Matlab Questions Skaler variables Make the following variables: a) v=7 b) x=1.8x10 to the power mines 13 c) y-3+4i, where i is the imaginary number d z-e to the power j2pV5, where j is the imaginary number and e is Euler's number (use exp,pi)
Q: Given: V = [4 -1 2 3 1 -2 5 0] and U=[5 -1 0 3 -3 2 1 51. Evaluate the following expressions and…
A: Find the required answer given as below and output :
Q: Q. Write a MATLAB program to calculate the following expression and round the answers to the nearest…
A: The program equates value of x as pi / 3. The value of y is equated as y = 2. For calculating value…
Q: Q: Evaluate the following expressions without using MATLAB a) 5 +3> 32/4 b) ~2>-1&11>=~1 c)…
A: ~ repesents logical not A=true then ~A gives false value & represents logical AND P & Q…
Q: Simplify the following expressions by applying Boolean rules. (XY)(YZ)
A: Answer to the given question: Boolean Rule: A bunch of rules or Laws of Boolean Algebra expressions…
Q: Find the error in the following code. (x=-10:1:10; y=-10:2:10; plot (x, y)) a) Plot is not available…
A: In MATLAB, the visualization of data can be done using plot() function. It takes at least two…
Q: 2. Translate the following into MATLAB statement (make x=3.0024): (a) Round x towards zero and store…
A: The following is the solution
Q: Q3\A) Write a MATLAB program that calculate the first 70 terms from the following series: √2 sin(2x)…
A: MATLAB defines functions for sine and cosine calculations as sin() and cos(). Also exponential…
Q: please write the matlab symbolic math expression of h(t).
A: Code: syms t ah(t)=(a/2)*exp(-a*abs(t))
Q: Write a MATLAB program to find MBI according to the formula BMI = mass/height^2 By Use the user…
A: Required: Write a MATLAB program to find MBI according to the formula BMI = mass/height^2…
Q: Suppose that x = 2 and y = 5. Define these variables in MATLAB and construct a program to compute…
A: NOTE : As per our company guidelines we are supposed to answer only one(1) question from the…
Q: n) Write a Matlab program that reads a number x and displays the value of tan(x) + tan-1(x) in the…
A: Write a Matlab program that reads a number x and displays the value of tan(x) + tan-1(x) in the…
Q: Using MatLab, compute for the equivalent resistance of the four resistors connected in (a) Series;…
A: Matlab code is in the following steps.
Q: Q-Find the error in the following code. x=-10:1:10; y=-10:2:10; plot(x,y) Plot is not available in…
A: Here the length of the two variables x and y are different and not same. While when we need to plot…
Q: In MATLAB, the output of the following code is X=54; if (x>50) fprintf('Error') end O Cannot be…
A:
Q: Find the value of z by using matlab expressión if you know that x=6, y =6 Z= x'. y'3n
A: Given value of x=6 and y=6. Use pi keyword in matlab to get value of pi. Store the expression ,…
Q: -Suppose that x=date of your birth and y is month of your birth. Use Matlab and calculate the…
A: Start Input x Input y Calculate and print Part a Calculate and print Part b Stop
Q: 3-i + 2+7i 8i 3 + 9-i 6-9i + 2i A = 1+2i Solve the given complex number and display in MATLAB the…
A: Code: z1=(3-i)/(2+7*1i)z2=(3)/(9-i)z3=(8*1i)/(1+2*1i)z4=(6-9*1i)/(2*1i)z=z1+z2+z3+z4AbsValue =…
Q: Q(1): Draw flowchart for GPA calculating program.
A: Q(1). How to calculate GPA? Find the sum of credits of all the subjects. Find the sum of product…
Q: 11 Function y = 2xx²2 Range (x, 0, t) [0,5] Plot Using plot (x, y)
A: According to the information given:- We have to plot mentioned function with its range in MATLAB
Q: Examine the following MATLAB code. What is the value of B at the end of :the program A=2; for…
A:
Q: In Matlab What is the expected output from the following code >> fprintf('The value is…
A: Given: fprintf('The value is %d,\n\nOK!\n',4^3) Required: output
Q: Q2. Write a MATLAB program to calculate the following expression: Y =T. cos'(x) +8 e" 10x where x=2.
A: To compute cos-1 we need to use acos(X) function and to compute e10x we use exp(x) If X is in…
Q: y = e-x/² sin 7x [0,4π] plot (x, y)
A: Given :
Q: if we write the following statement >> 27^(1/3)+32^0.2. then the Matlab output is
A: 27^(1/3) = 3 32^0.2 = 2 3+2 =5
Q: kercises (Hiw 1- Write a MATLAB program to calculate the following expression and round the answers…
A: I'm providing the all 4 parts with code, output and as well as graph. So that you can understand…
Q: Solve this in MATLAB. Given a non-linear equation (e^-x) - x =0. Use fixed point iteration method to…
A: i = 1; x0 = 1.0; % initial guess error = 0.0001; % error g = @(x) exp(-x) - x; % function use other…
Q: Q3:- Find the value of z by using matlab expression if you know that x-6, y =6 Z= x'. y'3n
A: Given expression is z=x3+y2+ 3π/x2+y2 To calculate power '^' operator pi=3.14 in Matlab…
Q: Q. Write a MATLAB program to calculate the following expression and round the answers to the nearest…
A: The program equates value of x as pi / 3. The value of y is equated as y = 2. For calculating value…
Q: MATLAB executes calculations according to the following order Parentheses, Exponentiation, O…
A: Operator precedence in programming language decides execution order of operators.
Q: امتحان الحاسبات النهائي الكورس الثا.. الوقت المتبقي 02:52:40 غیر مجاب علی الدرجة من 00 سؤال 22 ?What…
A: Answer : abs function or absolute function return the magnitude of the number.
Q: 16. Simplify the following boolean expressions: (a) (x ^ y) V (x ^¬y) v (-x ^ y) v (¬x ^¬y) (b) (x A…
A: (a) Simplified boolean expression: (x ∧ y) ∨ (x ∧ ¬y) ∨ ( ¬x ∧ y) ∨ ( ¬x ∧ ¬y) = x ∧ (y…
Q: Rewrite the following MATLAB codes without errors and find the output of the program after…
A: I give the code in Matlab along with output and code screenshots. I also highlighted the modified…
Q: 2. Find the value of w and z where x=3 and y=4. Use the MATLAB to evaluate the following expression.…
A: Here is the approach for the same :- Fisrt we have to calculate the numerator and denominator for…
Q: Q3: Write a matlab code to evaluate the following expression. f(x) = |xeax – cos (bx)|. For a=3,…
A: for x = [1,3,5,7,9] fx = abs( (x*e^(a*x)) - (cos(b*x)) ); disp(fx);end;
Q: Using MATLAB or Octave (a) prompt the user for what the current wind seed is outside their…
A: %avalue = input('Enter current wind seed outside:')%prompting and reading input%b%displaying type of…
Q: Q: Evaluate the following expressions without using MATLAB a) 5-10/2&7>=5+2 b) -9>-1|11>=-7 c) 4+4…
A: a) 5-10/2&7>=5+2 In the given expression, logical AND operator is used and it returns 1 only…
Q: 2. Translate the following into MATLAB statement (make x-3.0024): (a) Round x towards zero and store…
A: x = 3.0024;i = fix(x);j = floor(x);k = ceil(x);m = round(x);
Q: Home WORK 1) Write a MATLAB Program to derive the following equation for y Q= 3 sin[y) - 15 cos (x)…
A: 1. Code: syms x yQ=3*sin(y)-15*cos(x)diff(Q,x)
Q: Calculate z=e^-a sin(x)+10 √y for a=5 , x=2 and y=8 in decimal value. in MATLAB
A: Builtins: There are many mathematical functions predefined in MATLAB that are used for technical…
Q: Q3\A) Write a MATLAB program that calculate the first 70 terms from the following series: √2 sin(2x)…
A: M = 1; % first term x = 2; y = 3; % loop from 2 to 70 for i = 2:1:70 % if even term if mod(i,2) == 0…
Q: Matlab Code % Problem Statement - The area under a curve can be estimated by breaking % the x-axis…
A: MATLAB code to copy: syms x % declaring x as symbolicy = 8*sin(x) + 0.5*x.^2 - x; % function…
Q: Examine the following MATLAB code. What is the value of B at the end of :the program A=2; for…
A: Find the required answer with output given as below :
Q: Find the value of w and z where x = 3 and = 4. Use the MATLAB to evaluate the following expression.…
A: We have given the value of x and y. We need to find the value of w and z. We will calculate the…
Q: You are writing a function to calculate windchill, which has one output (Twc) and two inputs (Temp,…
A: Please find the answer below :
Q: QI/A) The resonant frequency f (in Hz) as given in the following equation: 1 f 2n LC 1 0.3 henrys, R…
A: In this question, we have given an expression denoted by "f." We have also gven the value of L,C,…
Q: write a code in MATLAB by using the BISECTION METHOD to solve the problem below.
A: The bisection method is used to find the roots of a polynomial equation. It separates the…
Q: Equation: u_t − (x^2)u_xx = 0 (t, x) ∈ (0,∞) × (0, 5), u(t = 0, x) = 0 for all x, u(t, x = 0) = 100…
A: Program to solve the following equation as below: u_t − (x^2)u_xx = 0 (t, x) ∈ (0,∞) × (0, 5), u(t =…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- 1) Guessing Game in Matlab . When the program starts, a random whole number , n , is selected where : n >=1 and n < = 200 . The user enter "a guess" and the program displays * " higher " if the guess is less n * " lower " if the guess is great than n * " correct " if the guess is equal to n . The game continues until the user enters a correct guess and the program quits . When the program quits , the total number of guesses is displayed as the score. 2) it's a matlab question but do it in Octave or use octave to do the question 3) in 100 words explain how sections of the code function or explains how your program works.1) Guessing Game in Matlab . When the program starts, a random whole number , n , is selected where : n >=1 and n < = 200 . The user enter "a guess" and the program displays * " higher " if the guess is less n * " lower " if the guess is great than n * " correct " if the guess is equal to n . The game continues until the user enters a correct guess and the program quits . When the program quits , the total number of guesses is displayed as the score. 2) in 100 words explain how sections of the code function or explains how your program works.1) Guessing Game in Matlab . When the program starts, a random whole number , n , is selected where : n >=1 and n < = 200 . The user enter "a guess" and the program displays * " higher " if the guess is less n * " lower " if the guess is great than n * " correct " if the guess is equal to n . The game continues until the user enters a correct guess and the program quits . When the program quits , the total number of guesses is displayed as the score. 2) in 200 words explain how sections of the code function or explains how your program works. 3) use online C compiler (hd) to do the question. 4) use while loop in the program
- (C PROGRAMMING ONLY) 7. Cornered! Attention again soldier! Our men have been cornered by the enemy and we need to save them or else this mission will fail. The first thing we need to do is to identify them, the ones cornered by the enemy! LET'S MOVE! Instructions: Ask the user for an integer input which represents the total number of men we have in the field. Then, ask the user for the numbers of each of the men. Finally, ask the user for two numbers which represents the enemies who have cornered our men.Then, print all the numbers of our men who have been cornered by the enemy (i.e. the numbers that are in between the two numbers of the enemy).Input 1. Total number of men 2. Numbers of the men 3. First number of the enemy Constraints This is guaranteed to be lesser than the second number of the enemy 4. Second number of the enemy Output Enter·the·total·number·of·our·men:·5Men #1: 139Men #2: 100Men #3: 44Men #4: 88Men #5: 200Enemy #1: 50Enemy #2: 150 Men Cornered:139 100 88Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…C++ Programming: A variable like userNum can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 pts) Output the input squared and cubed. Hint: Compute squared as userNum * userNum. (2 pts) Get a second user input into userNum2, and output the sum and product. (1 pt)
- Fill in the blank question: Q. BiDi is also known as _______________ Directional.Perform the following exercises in MATLAB. Write a program that will calculate the final velocity and time of travel of a baseball that is thrown downward from a tower of a certain height and initial speed. The program will ask the user to enter height (h) and initial velocity (vo). Calculate the final velocity (v) and calculate the time of travel (t). Display the result of the calculation. Use the formula below for the final velocity and travel time. Assume the acceleration due to gravity g = 32.1. Save program as LE9-2.m and flowchart/pseudo-code as LE9-2.png or LE9-2.txt.(C PROGRAMMING ONLY) 7. Cornered!by CodeChum Admin Attention again soldier! Our men have been cornered by the enemy and we need to save them or else this mission will fail. The first thing we need to do is to identify them, the ones cornered by the enemy! LET'S MOVE! Instructions: Ask the user for an integer input which represents the total number of men we have in the field. Then, ask the user for the numbers of each of the men. Finally, ask the user for two numbers which represents the enemies who have cornered our men.Then, print all the numbers of our men who have been cornered by the enemy (i.e. the numbers that are in between the two numbers of the enemy).Input 1. Total number of men 2. Numbers of the men 3. First number of the enemy Constraints This is guaranteed to be lesser than the second number of the enemy 4. Second number of the enemy Output Enter·the·total·number·of·our·men:·5Men #1: 139Men #2: 100Men #3: 44Men #4: 88Men #5: 200Enemy #1: 50Enemy #2: 150 Men…
- (Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.(General math) The value of p can be approximated by this series: 4(113+1517+....) Using this formula, write a program that calculates and displays the value of , using 2, 3, and 4 terms of the series.(General math) Write an assignment statement to calculate the circumference of a circle having a radius of 3.3 inches. The formula for determining the circumference, c, of a circle is c=2r, where r is the radius and p equals 3.1416.