一组数组,按顺序赋予矩阵,如何实现。

조회 수: 12 (최근 30일)
果博厅游戏网址【gb9905 .com】
l=[1 2 3 4 5 6 7 8 9 10 11 12]
Me=[156 22*l 54 -13*l;22*l 4*l^2 13*l -3*l^2;54 13*l 156 -22*l;-13*l -3*l^2 -22*l 4*l^2]*P*A*l/420;
例如,
Me1=[156 22*1 54 -13*1;22*1 4*1^2 13*1 -3*1^2;54 13*1 156 -22*1;-13*1 -3*1^2 -22*1 4*1^2]*P*A*1/420;
Me2=[156 22*2 54 -13*2;22*2 4*2^2 13*2 -3*2^2;54 13*2 156 -22*2;-13*2 -3*2^2 -22*2 4*2^2]*P*A*2/420;

채택된 답변

果博厅游戏网址【gb2032 .com】
仅供参考
l=[1 2 3 4 5 6 7 8 9 10 11 12];
P=5;
A=6;
Me=[];
for i=1:length(l)
Me{i}={[156,22*l(i),54,-13*l(i);22*l(i),4*l(i)^2,13*l(i),-3*l(i)^2;54,13*l(i),156,-22*l(i);-13*l(i),-3*l(i)^2,-22*l(i),4*l(i)^2]*P*A*l(i)/420};
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB 快速入门에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!