v(20) = 9.7 * (1-(20/50).^4).^2 in matlab

Math, Programming, Matlab, Variables, Equations

% Define the value of v(20) using the given equation v(20) = 9.7 * (1 - (20/50).^4).^2;

main.m

This code snippet defines the value of `v(20)` using the given equation in Matlab. We first define `v` as a variable that can hold values for all indexes between `-Inf` and `Inf`. Then, we use the given equation to compute the value of `v` at index `20` and assign that value to `v(20)`. The result is stored in the variable `v(20)`.
335 chars
3 lines

related categories

gistlibby LogSnag