필터 지우기
필터 지우기

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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by