Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Please tell me what these simple codes mean?
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Chris Yoo

Posts: 2
Registered: 6/29/13
Please tell me what these simple codes mean?
Posted: Jun 28, 2013 11:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

what do these mean?
Lmax=B(1,4);%Lmax is equal to the maximum value in the vector
Lmin=B(1,1);%Lmin is equal to the minimum value in the vector
La=B(1,2);%La is equal to one of the rests.
Lb=B(1,3);%Lb is equal to one of the rests.

if my inputs are 100,300,250 and 50, how will my Lmax, Lmin, La, and Lb be chosen?
------------------------------------------------------------------------------------------------------------------------
here are the inputs:

L0= 50,100,300
L1= 600,300,100
L2= 400,250,150
L3= 500,50,200

fprintf('Enter Link Length\n')
L0=input('Fixed link:');%input L0
L1=input('Shorter Side Link:');%input L1
L2=input('Coupler:');%input L2
L3=input('Longer Side link:');%input L3

A=[L0,L1,L2,L3];% arrange numbers into vector
B=sort(A);%sort numbers from min to max

Lmax=B(1,4);%Lmax is equal to the maximum
Lmin=B(1,1);%Lmin is equal to the minimum
La=B(1,2);%La is equal to one of the remainings.
Lb=B(1,3);%Lb is equal to one of the remainings.

thank you



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.