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

9 次查看(过去 30 天)
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!