Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. The Matlab routine in Figure 1 below is executed at the command line as B-fun routine(5) That is, fun routine is called in Matlab

image text in transcribed

2. The Matlab routine in Figure 1 below is executed at the command line as B-fun routine(5) That is, fun routine is called in Matlab with an input argument of n-5. a) The output B is which of the following data types: a scalar, a vector, a m something else? If B is a vector or matrix, what is its size? b) Determine the numerical value of output B, expect zero credit for listing an answer for A. If B is a vector, write out the entries of B in vector form; else if B is a matrix, write out the entries of B in matrix form. 1 function A = funroutine (n) - 3- 4- 5 6 A = zeros (n,n); for i=1:n for j = 1 : n if ( j-i-1 ) A(i,j) = n-1-1; elseif (j>i-1) 8 9 10- end end 12end Figure 1. Matlab code for Problem 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago