Prev: uitable column width
Next: parsing a string
From: Miguel Sopena on 3 Dec 2009 11:52 Hi there, The following script runs OK in Matlab 7.1.0.246: syms p real f = exp(p) / ( exp(p) - 1)^2 ); res = double (int (f,0.0001,100) However, in Matlab 7.8.0 I get the error message above ('In an assignment A(;) = B, the number of elements in A and B must be the same') which it appears is caused by the second line. Can anybody help?? I get the same error message with more complicated scripts I'm trying to migrate from one version to another. Any help much appreciated- Thanks! M Sopena Sussex University
From: Matt J on 3 Dec 2009 12:06 "Miguel Sopena" <m.sopena(a)sussex.ac.uk> wrote in message <hf8qc4$21q$1(a)fred.mathworks.com>... > Hi there, > > The following script runs OK in Matlab 7.1.0.246: > > syms p real > f = exp(p) / ( exp(p) - 1)^2 ); > res = double (int (f,0.0001,100) > > However, in Matlab 7.8.0 I get the error message above ('In an assignment A(;) = B, the number of elements in A and B must be the same') which it appears is caused by the second line. How does it appear to you to be coming from the 2nd line? I see no assignment expressions there.
From: Miguel Sopena on 4 Dec 2009 07:12 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hf8r6c$nte$1(a)fred.mathworks.com>... > "Miguel Sopena" <m.sopena(a)sussex.ac.uk> wrote in message <hf8qc4$21q$1(a)fred.mathworks.com>... > > Hi there, > > > > The following script runs OK in Matlab 7.1.0.246: > > > > syms p real > > f = exp(p) / ( exp(p) - 1)^2 ); > > res = double (int (f,0.0001,100) > > > > However, in Matlab 7.8.0 I get the error message above ('In an assignment A(;) = B, the number of elements in A and B must be the same') which it appears is caused by the second line. > > How does it appear to you to be coming from the 2nd line? I see no assignment expressions there. Hi Matt, thanks for replying You know how when you run the script Matlab tells you the lines in the script where the errors come from- I didn't copy the messages above but that's how I know. The script runs OK in the previous version of Matlab so I thought maybe symbolic expressions must be defined differently in the new version even though according to the help they are defined like in previous versions. I still don't know what's wrong with my script. Any help much appreciated. Thanks again, Miguel
From: Loren Shure on 4 Dec 2009 08:17 In article <hf8qc4$21q$1(a)fred.mathworks.com>, m.sopena(a)sussex.ac.uk says... > Hi there, > > The following script runs OK in Matlab 7.1.0.246: > > syms p real > f = exp(p) / ( exp(p) - 1)^2 ); > res = double (int (f,0.0001,100) > > However, in Matlab 7.8.0 I get the error message above ('In an assignment A(;) = B, the number of elements in A and B must be the same') which it appears is caused by the second line. > > Can anybody help?? I get the same error message with more complicated scripts I'm trying to migrate from one version to another. > > Any help much appreciated- Thanks! > > M Sopena > Sussex University > I'm not sure why that's the error message you get, but both lines 2 and 3 have unbalanced parentheses. Remove the final one on the second line and add it to the 3rd, perhaps. Be sure that preserves your intention. -- Loren http://blogs.mathworks.com/loren
From: Matt J on 4 Dec 2009 11:36
"Miguel Sopena" <m.sopena(a)sussex.ac.uk> wrote in message <hfaual$a0b$1(a)fred.mathworks.com>... > You know how when you run the script Matlab tells you the lines in the script where the errors come from- I didn't copy the messages above but that's how I know. ============= Well, you're in a much better position to diagnose this than we are, because you can see the error messages and we cannot :-) |