my matlab keeps crashing

180 Ansichten (letzte 30 Tage)
ali jumaa
ali jumaa am 7 Nov. 2015
Kommentiert: Walter Roberson am 2 Nov. 2022
matlab keeps crashing when i run a specific code, this code works perfectly on other computers. my computer is not old or anything like that. i do not have eny errors in the code.
  4 Kommentare
ali jumaa
ali jumaa am 9 Nov. 2015
Bearbeitet: Walter Roberson am 10 Nov. 2015
i have R2015a,here is the code. the input and disp texts is in swedish.
the code uses a file that contains a matrix in the size 80*80 and some other vectors and such. i dont think that the code has errors because it runs perfectly on other computers. the error or ¨crash¨appers after the first inputs, is appers when the first calculations is in action. my computer dose not shut down, just matlab, all i get is a window saying that matlab has internal problems.
clear all
clc
res=input('hur många reservoarer vill du ha 1 eller 8:');
knutpunkter=input('hur många knutpunkter vill du ha, 2500 eller 6400:');
if res==1 && knutpunkter==2500
load nat2500.mat
elseif res==1 && knutpunkter==6400
load nat6400.mat
elseif res==8 && knutpunkter==2500
load nat2500r8.mat
elseif res==8 && knutpunkter==6400
load nat6400r8.mat
else
disp('antal resoervoarer eller knutpunkter är felaktiga');
end
%n= trycket
svar = 'ja';
while strcmp(svar,'ja');
n=input('ange tryck:');
if res==1 && knutpunkter==2500
Z=[(-k*L*n^1) (1:2499)*0]';
elseif res==1 && knutpunkter==6400
Z=[(-k*L*n^1) (1:6399)*0]';
elseif res==8 && knutpunkter==2500
Z=[(-k*L*n^1) (-k*L*n^2) (-k*L*n^3) (-k*L*n^4) (-k*L*n^5) (-k*L*n^6) (-k*L*n^7) (-k*L*n^8) (1:2492)*0]';
elseif res==8 && knutpunkter==6400
Z=[(-k*L*n^1) (-k*L*n^2) (-k*L*n^3) (-k*L*n^4) (-k*L*n^5) (-k*L*n^6) (-k*L*n^7) (-k*L*n^8) (1:6392)*0]';
end
tic;
x=A\Z;
x=[x]
toc;
svar = input('vill du testa nytt tryck värde? (ja/nej): ','s');
end
if knutpunkter==2500
Q=reshape(x,[50,50]);
elseif knutpunkter==6400
Q=reshape(x,[80,80]);
end,
surf(X,Y,Q)
Image Analyst
Image Analyst am 10 Nov. 2015
If MATLAB itself crashes and says that "MATLAB has encountered and internal error and needs to close", then you really need to read my answer below again.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 7 Nov. 2015
If it's MATLAB that's actually crashing, rather than your program throwing an error, see the FAQ: http://matlab.wikia.com/wiki/FAQ#After_installation.2C_MATLAB_crashes_or_gives_an_error_message_when_I_try_to_run_MATLAB.

Shameem Hasan
Shameem Hasan am 14 Okt. 2018
How can I solve this crash problem and run my codes?
  3 Kommentare
Patrick Vianello
Patrick Vianello am 2 Nov. 2022
perhaps because there is NO answer in the above!
Walter Roberson
Walter Roberson am 2 Nov. 2022
The user's (2018) crash dumps all reported
Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at b:\matlab\src\jmi\javainit.cpp line 1346:
[ 0] 0x000000001111462a C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\win64\libmwfl.dll+00083498
and their hs_error_pid files all reported a java crash in
jogamp.nativewindow.windows.GDI.DescribePixelFormat1
This was a problem that happened to a number of people in different programs, in the 2017 / 2018 time frame.
According to one user, the key was to remove one of AMD driver management programs and install the driver manually; https://community.amd.com/t5/drivers-software/amd-driver-problem/td-p/474097
That fits in with the report at http://forum.salemthegame.com/viewtopic.php?f=10&t=6422 in which a user said that the AMD software was lying about the drivers being completely up to date, and that the problem was fixed for them by updating AMD graphics drivers.
Probable fix for @Shameem Hasan was to update their AMD graphics driver.
@Patrick Vianello: @Image Analyst did provide an answer, above, namely to call Mathworks Support. The volunteers cannot be expected to debug Mathworks crashes -- we do not have access to the source code, and we probably do not run the same hardware and software combinations as the users that have the crash problems.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by