MATLAB: How to call element from vector out of t = @(theta) x*cos(theta)-y*sin(theta); MATLABmatlab function x = linspace(1,10,10);y=x;t = @(theta) x*cos(theta)-y*sin(theta); t(0.1) will give me vector. How to get element 5 ? Best Answer My approach:tv = t(0.1);t5 = tv(5) % Element 5 Related SolutionsMATLAB: How to define a function that evaluates in input function y=T(theta_Degree)theta=theta_Degree*pi/180;y=[cos(theta)^2 sin(theta)^2 2*cos(theta)*sin(theta);sin(theta)^2 cos(theta)^2 -2*cos(theta)*sin(theta);-cos(theta)*sin(theta) cos(theta)*sin(theta) cos(theta)^2-sin(theta)^2];endThen type in command lineT(40)and see the results. MATLAB: Plot of theta_new and cos theta After the first plot(theta_new,cos(theta_new),'*')add hold onand remove the second plot() call. Related QuestionSolving non linear equation using fsolveNewton’s method(calculating theta)
Best Answer