Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 30 For Questions 30 and 31 refer to the following MATLAB function (xy) defined in file xy.m: function [a] =xy (x, y) a =
QUESTION 30 For Questions 30 and 31 refer to the following MATLAB function (xy) defined in file xy.m: function [a] =xy (x, y) a = x.^2 - 2*y + 1; y=10; end 30. What will be displayed when the code segment below is executed? a=1; b=2; c=xy (a,b); disp (c) 1.-2 2.-18 3.0 4. None of the above or an error message will be displayed. 0 1 O 2 O 3 04 QUESTION 31 31. What will be displayed when the code segment below is executed? x=1; y=2; a=xy (x,y); disp ([x y a]) 1. 1 10-18 2. 12-2 3. 1 10-2 4. None of the above or an error message will be displayed. 0 1 02 O 3 04
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started