i typed my code ... when i let it run than it posts a error an matlab is closed down
my code:
clc
clear all
close all
format long g
%%Hausübung - Bedingte Ausgleichung
% Ausgleichender Kreis
syms x xm_k y ym_k r_k
f = (x-xm_k)^2+(y-ym_k)^2-r_k^2;
% Jacobi matrix d Unbekannten
dfdxm= diff(f,xm_k)
dfdym= diff(f,ym_k)
dfdr= diff(f,r_k)
% Jakobi matrix d Beobachtungen
dfdx=diff(f,x)
dfdy=diff(f,y)
% 12 Kreispunkte manuell eingemessen Beobachtungen :
Punkte= [43.594, 24.424;
25.427,43.020;
0.440,49.961;
-24.627,43.473;
-43.018,25.438;
-49.995,0.550;
-43.571, -24.550;
-25.444, -43.087;
-0.397, -50.054;
24.522, -43.620;
43.163, -25.272;
50.003, -0.230];
b= [43.594;
24.424;
25.427;
43.020;
0.440;
49.961;
-24.627;
43.473;
-43.018;
25.438;
-49.995;
0.550;
-43.571;
-24.550;
-25.444;
-43.087;
-0.397;
-50.054;
24.522;
-43.620;
43.163;
-25.272;
50.003;
-0.230];
% Näherungswerte für Unbekannte:
xm_k=0;
ym_k=0;
r_k=50;
% Qbb handschriftlich bestimmt Varianz 1 und Kovarianz 2
Qbb= zeros(length(b));
for r=1:length(b)
Qbb(r,r)=2;
end
for r = 1:length(b)-1
if mod(r,2)~=0
Qbb(r+1,r)=1;
elseif mod(r,2)==0
Qbb(r+1,r)=0;
end
if mod(r,2)~=0
Qbb(r,r+1)=1;
elseif mod(r,2)==0
Qbb(r,r+1)=0;
end
end
% Erestellen der Jacobi Matrix d Unbekannten : A
A=[];
B1=[];
for i=(1:length(Punkte))
x = Punkte(i,1);
y = Punkte(i,2);
dfdxm1= eval(subs(dfdxm));
dfdym1= eval(subs(dfdym));
dfdr1= eval(subs(dfdr));
A=[A;dfdxm1,dfdym1,dfdr1];
dfdx1 = eval(subs(dfdx));
dfdy1 = eval(subs(dfdy));
B1=[B1;dfdx1,dfdy1];
%B(k,j)=dfdx1;
%B(k,j+1)= dfdy1;
% j=j+2;
end
j=1;
B=zeros(12,24);
for k=1:12
B(k,j)=B1(k,1);
B(k,j+1)=B1(k,2);
j=j+2;
end
w=[];
for i = 1:length(Punkte)
x = Punkte(i,1);
y = Punkte(i,2);
w1= eval(subs(f));
w=[w;w1];
end
dx_dach=-(inv(A'*inv(B*Qbb*B')*A))*A'*inv(B*Qbb*B')*w;

 채택된 답변

Image Analyst
Image Analyst 2014년 1월 15일

0 개 추천

For fatal crash and burns like that, 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. - basically, call the Mathworks.

댓글 수: 2

franziska
franziska 2014년 1월 15일
i havent found an solution for my Problem it is normaly non. the Programm run till i multiplicate 2 matrices than throws the error... by my friend when he tips my code in his Programm it works ....^^
Image Analyst
Image Analyst 2014년 1월 15일
Are you using any third party executable files like DLLs? Or is it all just straight out-of-the-box MATLAB code? There could be many complicated reasons for such a crash and we aren't able to troubleshoot much, which is why the FAQ recommends you contact the Mathworks.

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

추가 답변 (0개)

질문:

2014년 1월 15일

댓글:

2014년 1월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by