MY problem is that exp() does not seem to function properly when used on a vector.
The relevant code is:
t=sum(X1.*repmat(BETA',n,1),2) + GAMMA(l); e.g. % 400x1 vector
p_ik = exp(t);
However, for example p_ik(400) is totally different from exp(t(400)), which mathematically should be equal. The difference is in the range 100's, exp(t(400)) = 909, p_ik(400) = 0.0910. Any ideas what the problem is/ how to solve it?
Any help why exp() is not functioning correctly on the matrix

1 件のコメント

Jan
Jan 2014 年 4 月 15 日
There is no problem to solve. The maths is correct. Obviously t(400) is not 400.

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

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 15 日

0 投票

If
t=0:0.1:500
t(400) and t=400 are different

カテゴリ

ヘルプ センター および File ExchangeParallel Computing Toolbox についてさらに検索

タグ

質問済み:

Job
2014 年 4 月 15 日

コメント済み:

Jan
2014 年 4 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by