I would like to plot the following function
norm(A-x*eye(3),2)
on the interval -1 < x < 1, where A is a fixed 3x3 matrix. Somebody has an idea how can I do this?
x = linspace(-1, 1, 100); % plot 100 points
y = arrayfun(@(x) norm(A-x*eye(3), 2), x);
plot(x,y);
fplot(@(x) norm(A-x*eye(3),2),[-1,1])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.