Cannot get Q1, Q2, ..., Qn equations
1 view (last 30 days)
Show older comments
I am doing a very easy program to solve beams. I want to make an infinite counter depending on the number of distributed loads the beam has. The code is:
clear all
clc;
syms L a b P x c1 c2 c3 c4 c5 n s r q
L=input('Length of the beam: ');
p=input('Start location of the load: ');
q=input('End location of the load: ');
r=input('Start magnitude of the load: ');
s=input('End magnitude of the load:' );
m=-(s-r)/(q-p);
b=-(m*p)-r;
Q=m*x+b #this is the equation of the load
end
What I want to do is get an "n" number of "Q" equations. For example, i have "n" distributed loads, so I need all of the following equations: Q1, Q2, ..., Qn.
0 Comments
Answers (1)
dpb
on 10 Jul 2014
Once again, "don't do that!!!" See the FAQ on "the Matlab way" to avoid it.
0 Comments
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!