フィルターのクリア

how to find symprod for double type values if i take it as seperate function. I am getting this error Undefined function 'symprod' for input arguments of type 'double'. Error in practise (line 5) y=symprod(x,j,1,3);

1 回表示 (過去 30 日間)
function y= practise(k)
k=2;
x=(rand(4)).*k;
syms j;
y=symprod(x,j,1,3);
end

採用された回答

Birdman
Birdman 2018 年 4 月 3 日
Change this line
x=(rand(4)).*k;
to
x=sym(rand(4).*k);
  7 件のコメント

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

その他の回答 (1 件)

Steven Lord
Steven Lord 2018 年 4 月 3 日
You want to compute the product of the elements of x? If that's the case, don't use symprod. There are no symbolic calculations necessary. Just use the prod function instead.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by