I have a function returning a 3x1 vector. I now want to plot three graphs for these three outputs.
이전 댓글 표시
Here is my function:
function [ T] = inlamning1( F, m, l )
%Ax = b, A = alla skalärer framför T1,T2,T3 i de tre ekvationerna.
%T = [T1, T2, T3]
%b = skalärerna mg och F
A = [cosd(30), cosd(30), cosd(45); -1*sind(30), sind(30), sind(45); 10*cosd(30), 0, -1*cosd(45).*l];
b = [F*cosd(45)+ m*9.81; -1*F*sind(45) ; -1*F*cosd(45)*10];
T = A\b;
I now want to draw three diffrent graphs showing how T1, T2 and T3 differs for different values of l (l = linspace(5,10))
How can i do that?
댓글 수: 1
John D'Errico
2014년 10월 21일
Please use the code formatting button to make your code readable. Select the block of code, then click on the {}Code button.
Next, it is a terrible idea to use the lower case letter l as a variable name. Far too often it will be confused with the number 1, thus 1 versus l. Of course, if your goal is to obfuscate your code completely, making it impossible to read and debug ever, even for you, then use only variable names composed of a jumble of the letters O and l, and the numbers 0 and 1.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Lengths and Angles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!