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

8 views (last 30 days)
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;

Accepted Answer

果博厅游戏网址【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

More Answers (0)

Categories

Find more on MATLAB 快速入门 in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!