how do i print this matrix?

2 ビュー (過去 30 日間)
Ann Lee
Ann Lee 2022 年 4 月 1 日
コメント済み: Ann Lee 2022 年 4 月 1 日
a,b,c are series. (1 to infinite)
a= nthroot(n.^2,5)./(3.^n*(n+1))
b= (3*n.^2+n)/(2*n.^4+nthroot(n,2))
c= (nthroot(37,2)*n.^3)/((2*n.^3)+(3*n.^2))
Paragraphs 10, 20, 30, ...., and 160 (sum) of series a), b), c) forloop
Find each of the values in row 1, row 2, and row 3 of the matrix 3x16
and print it out
there is a syntax error , and i don't know problem..
syntax error
>>> k=10:10:160
^
could you check my code?
and i don't know what should i type in ( ) on Command window
my code:
function work5(x)
m=1;
for
k=10:10:160
n=1:k;
a= sum(nthroot(n.^2,5)./(3.^n*(n+1)));
A(1,m)=a;
a= sum((3*n.^2+n)/(2*n.^4+nthroot(n,2)));
A(2,m)=a;
a= sum((nthroot(37,2)*n.^3)/((2*n.^3)+(3*n.^2)));
A(3,m)=a;
m=m+1;
end

採用された回答

Jan
Jan 2022 年 4 月 1 日
Join the lines
for
k=10:10:160
to
for k=10:10:160
  2 件のコメント
Ann Lee
Ann Lee 2022 年 4 月 1 日
I got error..!
>> work5(0.5)
error: operator *: nonconformant arguments (op1 is 1x10, op2 is 1x10)
error: called from
work5 at line 7 column 4
Ann Lee
Ann Lee 2022 年 4 月 1 日
oh it worked!!!!!! thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by