Matlab crashes but Octave doesn't

조회 수: 1 (최근 30일)
Douglas Brenner
Douglas Brenner 2019년 1월 2일
답변: Douglas Brenner 2019년 1월 2일
The program below runs in Octave but crashes Matlab 2014. Mathworks won't help because my contract has run out. Any ideas would be helpful.
X = [1 , 2 ,3 , 4 ,5];
Y = [1,4,9,4, 1];
xdata = X(:);
A = [xdata.^2, xdata, ones(size(xdata))]
b = log(Y(:));
x = A\b
mu = -x(2)/x(1)/2;
sigma = sqrt( -1/2/x(1) );
A0 = exp(x(3)+mu^2/(2*sigma^2));
  댓글 수: 14
John D'Errico
John D'Errico 2019년 1월 2일
Essentially, it means you can't use MATLAB for this, at least a too old release on a too new computer. I'm actually surprised MATLAB even started up. Complain to your institution (as if that will help.) But you can try. Argue that as new students enter the system, they are bringing in new (current) computers.
Walter Roberson
Walter Roberson 2019년 1월 2일
Apple made changes to MacOS that prevent older versions of MATLAB from running. (See my previous remarks about external interfaces...)

댓글을 달려면 로그인하십시오.

채택된 답변

James Tursa
James Tursa 2019년 1월 2일
What happens if you do the A\b differently? E.g., doing the LU decomposition manually and then backsolving yourself? Or doing pinv(A)*b?

추가 답변 (2개)

Image Analyst
Image Analyst 2019년 1월 2일
If you need it in MATLAB, then pay the money and upgrade. It doesn't crash for me on R2018b. It gives:
A =
1 1 1
4 2 1
9 3 1
16 4 1
25 5 1
x =
-0.511931276922301
3.07158766153381
-2.58955627854091

Douglas Brenner
Douglas Brenner 2019년 1월 2일
Give that man a cigar and thank you very much.
pinv(A)*b work as I suspect doing the LU decomposition manually would.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by