jinglan.seiran
BAN USER- 0of 0 votes
AnswersThe nargin and nargout command returns the number of input and output respectively for a function.
- jinglan.seiran
nargin is particularly useful when the input values are trivial. For example (0, 0) seems to be trivial
input in Q5. Modify the program so that the default value of (a,b) is (0,0) whenever it is not specifed
by the user.
Q5:The following function is supposed to generate an array of Cartesian coordinates for a circle with
radius r and centered at (a; b).
function [x,y] = circle(r,theta)
theta = [0:pi/100:2*pi];
x = r*cos(theta);
y = r*sin(theta);
end| Report Duplicate | Flag | PURGE
Student student
- 1 Answer asking solution for the problems
Q1: Write a MATLAB function le that takes a matrix A as an input and returns it's diagonal part D, lower triangular part L and upper triangular part U.
- jinglan.seiran April 25, 2014
Q2:Write a MATLAB function maxmin that returns the maximum and minimum value for an input array
x as well as the indices that correspond to the maximum/minimum.| Flag | PURGE