Website Owner Gay Thayoli
matlab420 loosukoodhi November 26, 2024 November 19, 2024 mat Here is the code with proper indentation and formatting applied to all the sections for better readability and execution: 1) Tangent Line for a Function syms x y = input('Enter the function of x: '); x1 = input('Enter x value at which tangent is to be drawn: '); ezplot(y, [x1-2 x1+2]) hold on y_derivative = diff(y, x); slope = subs(y_derivative, x, x1); y1 = subs(y, x, x1); Tgt_line = slope * (x - x1) + y1; h = ezplot(Tgt_line, [x1-2 x1+2]); set(h, 'color', 'r') hold off 2) Area Between Two Curves syms x y1 = input('Enter the Y1 region value: '); y2 = input('Enter the Y2 region value: '); fg = figure; ax = axes; ez1 = ezplot(char(y1)); hold on ez2 = ezplot(char(y2)); t = solve(y1 - y2); f = int(y1 - y2, t(1), t(2)); kokler = double(t); x1 = linspace(kokler(1), kokler(2)); yy1 = subs(y1, x, x1); yy2 = subs(y2, x, x1); xx1 = [x1, x1]; yy = [yy1, yy2]; fill(xx1, yy, 'g...