Creating a matrix for a function

11 ビュー (過去 30 日間)
Doga Ersuz
Doga Ersuz 2022 年 6 月 21 日
回答済み: Torsten 2022 年 6 月 21 日
% create matrix A for
% f = c₀ + c₁sin(t) + c₂cos(t) + c₃sin(2t) + c₄cos(2t)
%A =
Tis is the question that I should complete.
f (t) = a +b t +c t ^2
A = [t .^0 t.^1 t .^2]
And this is the example that my proffessor gave me. But when I solve the question according to the exmaple it gives this error '' Check matrix A
The submission must contain a variable named A. '' Can anyone help me with that? Thanks for your time.
  1 件のコメント
KSSV
KSSV 2022 年 6 月 21 日
Show us the full example, which threw this error.

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

採用された回答

Torsten
Torsten 2022 年 6 月 21 日
A = [ones(numel(t),1),sin(t),cos(t),sin(2*t),cos(2*t)]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by