Cannot get Q1, Q2, ..., Qn equations

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.

Categories

Find more on Programming in Help Center and File Exchange

Asked:

on 10 Jul 2014

Answered:

dpb
on 10 Jul 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!