-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_any.m
67 lines (53 loc) · 1.82 KB
/
plot_any.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
function [] = plot_any( element, Dane, wsp)%% Zadanie po�o�enia punktu, kt�rego po�o�enie b�dzie obliczane
%wsp = [0.1; -0.15]; % Po�o�enie punktu w lokalnym uk�adzie
close all;
T = cell2mat(Dane(1));
Q = cell2mat(Dane(2));
DQ = cell2mat(Dane(3));
D2Q = cell2mat(Dane(4));
%% Obliczenia
t = T(:,1);
for time=1:length(T)
%IIrK(1:2,time) = [(3*body-2,time);Y(3*body-1,time)]+RotMat(Y(3*body,time))*rKloc;
IIrK(1:2,time) = [Q(3*element-2,time);Q(3*element-1,time)]+RotMat(Q(3*element,time))*wsp;
IIrdotK(1:2,time) = [DQ(3*element-2,time);DQ(3*element-1,time)] + Omega()*RotMat(Q(3*element,time))*wsp*DQ(3*element,time);
IIrddotK(1:2,time) = [D2Q(3*element-2,time);D2Q(3*element-1,time)] - RotMat(Q(3*element,time))*wsp*DQ(3*element,time)*DQ(3*element,time)...
+ Omega()*RotMat(Q(3*element,time))*wsp*D2Q(3*element,time);
end
%% Dzikie ploty
name = 'Q(x)';
f = figure('Name',name);
movegui(f,'northwest');
name = 'Wykres przemieszczenia po wspolrzednej x';
plot( t, IIrK( 1 , : ) );
title(name)
name = 'Q(y)';
f = figure('Name',name);
movegui(f,'southwest');
name = 'Wykres przemieszczenia po wspolrzednej y';
plot( t, IIrK( 2 , : ) );
title(name)
name = 'DQ(x)';
f = figure('Name',name);
movegui(f,'north');
name = 'Wykres predkosci po wspolrzednej x';
plot( t, IIrdotK( 1 , : ) );
title(name)
name = 'DQ(y)';
f = figure('Name',name);
movegui(f,'south');
name = 'Wykres predkosci po wspolrzednej y';
plot( t, IIrdotK( 2 , : ) );
title(name)
name = 'D2Q(x)';
f = figure('Name',name);
movegui(f,'northeast');
name = 'Wykres przyspieszenia po wspolrzednej x';
plot( t, IIrddotK( 1 , : ) );
title(name)
name = 'D2Q(y)';
f = figure('Name',name);
movegui(f,'southeast');
name = 'Wykres przyspieszenia po wspolrzednej y';
plot( t, IIrddotK( 2 , : ) );
title(name)