How to write this b in matrix form

1 次查看(过去 30 天)
Sam
Sam 2014-4-22
评论: Sam 2014-4-23
Can anyone help me write this b in matrix form in matlab?

回答(1 个)

Joseph Cheng
Joseph Cheng 2014-4-22
编辑:Joseph Cheng 2014-4-22
Look for the patterns and you can build these efficiently.
n=100;
b=1:n;
b=b.^2;
b=b/(n+1)^4;
b(1)=b(1)+1;
b(end)=b(end)+6;
  3 个评论
Joseph Cheng
Joseph Cheng 2014-4-22
编辑:Joseph Cheng 2014-4-22
well i can't do everything for you. Talk about looking at a gift horse in the mouth. just transpose what i wrote or initialize b to be the correct size.
Sam
Sam 2014-4-23
Wow chill man. I wasn't telling you to do everything. I just didn't know how to write this as a matrix form in matlab, that's all.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by