フィルターのクリア

Plotting equation with constant

1 回表示 (過去 30 日間)
sweetdreams
sweetdreams 2015 年 5 月 12 日
コメント済み: Nobel Mondal 2015 年 5 月 12 日
Hi all
I'm trying to plot this graph but for some reason it does not seem to be working.
temp = 250:10:300;
%k = 1.3806488.*exp(-23);
%meu = 9.27400968*exp(-24);
%N = 1:10;
beta = 1/k*temp;
B = 0:0.25:1;
ent = k*N*(log(2*cosh(beta*meu*B))-beta*meu*B*tanh(beta*meu*B));
ent2 = ent/(k*N*(log(2)));
plot(temp,ent2)
I basically want to plot the ent2 equation with different values of B as a function of temperature. The other symbols are all physical constants and have values but I don't know whether I need to put them in as the only value I want to change is B. I've tried just defining the other symbols with syms function but that didn't work either...
  1 件のコメント
Nobel Mondal
Nobel Mondal 2015 年 5 月 12 日
I believe the issue is with Matrix dimensions. temp and beta are of size (1,6). N is of size (1, 10). B is of size (1,5)
You can't possibly multiply them with each other.

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

回答 (0 件)

カテゴリ

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