MATLAB: Need a help doing simple code

codederivatesinputsimple

Hello guys. I have some problem in below code.
First of all I want to input 4 variables(W, L, H, R).
And then q,a,b are defined as below.
q=H/L, a=W/q, b=(W*(1-R)/(2*q));
And then fuction f(X), g(X), h(x), p(x) are defined as below
f(x)=sqrt(a*x+b^2)-x-b
h(x)=W*0.9-x;
and the intersection of f(x) and h(x) is defined as (m,n)
and then g(x)=f(t)/t*x , (t,f(t)) is a point on the f(x)
p(x)=(f(t)-n)/(t-m)*(x-m)+n
now, A(t) is defined as below.
A(t)=integral of (f(x)-g(x)) at (0<x<t) + integral of (f(x)-p(x)) at (t<x<m)
and I want to show the value of t when A'(t)=0
Can you guy help me…?

Best Answer

To learn Matlab you can start by something like
function y = myfunction(W, L, H, R)
q=H/L;
a=W/q;
b=(W*(1-R)/(2*q));
and so on and then ask more specific questions if you have further problems. I might be hard to find someone that does your homework for you, and it wouldn't help you in the long run.