differentiate v(t) = v0 * (1-(t/y).^4).^2 when t = 20 and y = 50 and v0 = 9.7 in matlab

To differentiate the function v(t) = v0 * (1-(t/y).^4).^2 with t = 20, y = 50, and v0 = 9.7 in Matlab, you can use the symbolic differentiation feature provided by the Symbolic Math Toolbox.

Here's the code to differentiate v(t):

main.m
syms t y v0         % Define symbolic variables
v(t) = v0*(1-(t/y).^4).^2   % Define the function
diff_v = diff(v, t);        % Differentiate v(t) with respect to t
165 chars
4 lines

Then, to evaluate diff_v at t = 20, y = 50, and v0 = 9.7, you can substitute these values into diff_v using the subs() function:

main.m
diff_v_t20 = subs(diff_v, [t y v0], [20 50 9.7])
49 chars
2 lines

This will give you the value of the derivative of v(t) with respect to t at t = 20, y = 50, and v0 = 9.7.

gistlibby LogSnag