Element by Element Multiplication?

5 ビュー (過去 30 日間)
Joseph Percsy
Joseph Percsy 2013 年 4 月 5 日
Currently I have this.
x = [1, .1, .01, .001, .0001, .00001, .000001, .0000001, .00000001, .000000001, .0000000001, .00000000001];
f = 0;
e = 2.71828;
for i = 1:length(x);
f = (e.^(x).*sin(x)/x).^2
end
Now I want it to display f for every single value of X, not just the end result. What am I doing wrong?

採用された回答

Walter Roberson
Walter Roberson 2013 年 4 月 5 日
Use ./ instead of /

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by