Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. NumberOfUDL = input('How many UDL are acting on a structure? - ');
  2. formatSpec = ('Please add the value of UDL in Newtons for ? %d \n (Enter negative value if load is acting downwards) - ');
  3. UDLM = zeros(1,NumberOfUDL);
  4. S = zeros(1,NumberOfUDL);
  5. E = zeros(1,NumberOfUDL);
  6. nforUDLM = 0;
  7. while nforUDLM < NumberOfUDL
  8. nforUDLM = nforUDLM+1;
  9. str = sprintf(formatSpec,nforUDLM);
  10. prompt = str;
  11. UDLM(nforUDLM) = input(prompt);
  12. string = sprintf('Please add starting point of the UDL ? %d - ',nforUDLM);
  13. prompt = string;
  14. S(nforUDLM) = input(prompt);
  15. string = sprintf('Please add ending point of the UDL ? %d - ',nforUDLM);
  16. prompt = string;
  17. E(nforUDLM) = input(prompt);
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement