필터 지우기
필터 지우기

Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

조회 수: 1 (최근 30일)
% calculations of envelope from vehicle uniformly distributed load
Max = zeros(n,n);
Min = zeros(n,n);
for j = 1:n
for i = 1:n
if Im(i,j)>= 0
Max(i,j) = Im(i,j)*q_max*dx;
Min(i,j) = 0;
end
if Im(i,j)<0
Max(i,j) = 0;
Min(i,j) = Im(i,j)*q_max*dx;
end
end
end
for i = 1:n
EnvQ(i,1) = sum(Min(:,i));
EnvQ(i,2) = sum(Max(:,i));
end
% calculations of envelope from vehicle passage
temp = [zeros(36,n);Im]
+ [zeros(24,n);Im;zeros(12,n)]
+ [zeros(12,n);Im;zeros(24,n)]
+ [Im;zeros(36,n)];
for i = 1:n
EnvV(i,1) = min(temp(:,i))*V_max;
EnvV(i,2) = max(temp(:,i))*V_max;
end
% calculations of total envelope
Env = EnvG + EnvQ + EnvV;
% preparation of figures and saving of envelopes
figure('WindowState','maximized')
x = 0:dx:sum(L);
plot(x,EnvG(:,1),'b',x,EnvG(:,2),'r',
'LineWidth',1.5)
xlim([0 sum(L)])
set(gca,'ydir','reverse','FontSize',14)
xlabel('x [m]')
ylabel('M [kNm]')
title('Env M(G)')
grid
saveas(gcf,'Env_M(G).fig')
saveas(gcf,'Env_M(G).bmp')
figure('WindowState','maximized')
x = 0:dx:sum(L);
plot(x,EnvQ(:,1),'b',x,EnvQ(:,2),'r',
'LineWidth',1.5)
xlim([0 sum(L)])
set(gca,'ydir','reverse','FontSize',14)
xlabel('x [m]')
ylabel('M [kNm]')
title('Env M(Q)')
grid
saveas(gcf,'Env_M(Q).fig')
saveas(gcf,'Env_M(Q).bmp')
figure('WindowState','maximized')
x = 0:dx:sum(l);
plot(x,EnvV(:,1),'b',x,EnvV(:,2),'r',
'LineWidth',1.5)
xlim([0 sum(L)])
set(gca,'ydir','reverse','FontSize',14)
xlabel('x [m]')
ylabel('M [kNm]')
title('Env M(V)')
grid
saveas(gcf,'Env_M(V).fig')
saveas(gcf,'Env_M(V).bmp')
figure('WindowState','maximized')
x = 0:dx:sum(L);
plot(x,Env(:,1),'b',x,Env(:,2),'r',
'LineWidth',1.5)
xlim([0 sum(L)])
set(gca,'ydir','reverse','FontSize',14)
xlabel('x [m]')
ylabel('M [kNm]')
title('Env M(G,Q,V)')
grid
saveas(gcf,'Env_M.fig')
saveas(gcf,'Env_M.bmp')
plot(x,EnvG(:,1),'b',x,EnvG(:,2),'r',
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for
mismatched delimiters.
  댓글 수: 3
Norma
Norma 2023년 12월 8일
yes, can u solve my problem. because the code from paper i think stil incorrect
Walter Roberson
Walter Roberson 2023년 12월 8일
Everything before the final line you posted is part of table 2, ending at the bottom of the second last panel of table 2 right above the MATLAB logo.
The final line you posted is a partial line from roughly 1/2 way down on the final panel of table 2, posted missing some of the lines above it. The line got truncated by whoever copied it. The actual line is
plot(x,EnvQ(:,1),b,x,EnvQ(:,2),r, LineWidth,1.5)
but you need the other lines from the last panel of table 2.

댓글을 달려면 로그인하십시오.

답변 (1개)

madhan ravi
madhan ravi 2023년 12월 8일
편집: madhan ravi 2023년 12월 8일
plot(x,Env(:,1),'b',x,Env(:,2),'r')
Note: just responding to the error message, assuming rest of the code works fine.
  댓글 수: 3
Dyuman Joshi
Dyuman Joshi 2023년 12월 8일
@Norma, It's not clear (atleast to me) what you are asking about in the comment above.
Please be more specific.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by