Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: ??? Subscripted assignment dimension mismatch.
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jack

Posts: 1
Registered: 5/9/13
??? Subscripted assignment dimension mismatch.
Posted: May 9, 2013 3:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, everyone, actually I'm not really fluent using this software, my problem is, I keep getting this warning, "??? Subscripted assignment dimension mismatch.", when runnin my scripts below :

mfile 1 : j.m

function dTdr=j(r,T,q,k)
dTdr=[T(1);-q/k-1/r*T(1)];


mfile 2 : o.m

function E=o(m)
r=[0:1:10];
T=[900 919 900 869 825 770 700 620 525 429 300
38 -13 -27.08333333 -37.58333333 -49.33333333 -62.58333333, ...
-75 -88.25 -94 -96.5 -145.5]';
[r,Tmodel]=ode45(@j,r,[900 38],[],m(1),m(2));
E=sum((T-Tmodel).^2);

mfile 3 :

clear
clc
m=fminsearch('o',[1 1])


what i;m trying to do is to solve Higher Order Differential Equation, like this :

d^2T/dr^2 + 1/r*dT/dr = -q/k

thanks for the help ;)



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.