Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

What is wrong with my coding?

조회 수: 3 (최근 30일)
MR JUSTIN ACHARJEE Sumanta
MR JUSTIN ACHARJEE Sumanta 2022년 1월 20일
마감: Rik 2022년 1월 20일
Enter the magnitude and the position of the loading factors lateral to the beam axis, including point loads, moments and uniformly distributed loads. The number of the loading factors of the each kind must be defined by a user interactively. The input data control must be implemented.
%%Q1b
clear;clc;
% Get the value of the point load acting on the beam along with its positions
npl = input('Enter the number of point loads acting on the beam');
n=0
while((n < npl))
p(n+1) =input('Enter the point load')
loc(n+1) = input('Enter the distance of point load from left end')
% Check if the point loads are present inside the beam
if (loc(n+1)>l)
sprintf(' The point load cannot be outside the span of beam')
loc(n+1) = input('Enter the distance of point load from left end')
end
n = n+1
end
% Get the value of the uniformly distributed loads acting on the beam along with its span
nud = input('Enter the number of uniformly distributed loads acting on the beam');
q=0
while((q < nud))
ud(q+1) =input('Enter the intensity of loading')
locud(q+1) = input('Enter the distance of start of udl from left end')
spanud(q+1) = input('Enter the span of udl')
q = q+1
end
  댓글 수: 1
Ankit
Ankit 2022년 1월 20일
what kind of error you are getting? you questions/problems are not clear

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by