CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 03:54:46 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=f76cf77e3516c73835779f40e93fd867d7ebf4608a6b7c4eb447be1e635f08fda%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22nuKkUW2wM3EI3-61J4LRH0XpbJ2Dk_Oq%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d3a8656b70e9c3-BLR
% UC: 21048 - Física Geral % Ano 2022/23 - EFOLIO B - Gráfico Pêndulo Gravític - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % UC: 21048 - Física Geral
- % Ano 2022/23 - EFOLIO B - Gráfico Pêndulo Gravítico - UAb
- % Aluno: 2100927 - Ivo Baptista
- clc
- close all
- % Fecha os graficos que estão abertos
- clear all
- % Constantes
- m = 0.0026; % Massa em g
- L = 1.0; % Comprimento em m
- r = 0.3; % Raio em m
- g = 9.81; % Aceleração da gravidade em m/s^2
- rho = 1.2; % Massa específica do ar em kg/m^3
- cd = 0.1; % Coeficiente de arrasto
- A = pi * r^2; % Área transversal da esfera
- % Calcula o coeficiente de arrasto aerodinâmico
- b = 1/2 * rho * cd * A;
- % Valores iniciais
- theta0 = 0.05; % Ângulo inicial em rad
- w0 = 0.0; % Velocidade angular inicial em rad/s
- t0 = 0.0; % Tempo inicial em s
- h = 0.1; % Passo de tempo em s
- t = 0; % Valor inicial do tempo
- tend = 100; % Valor final do tempo
- ciclos = (tend - t)/h % Numero de ciclos
- % Listas para armazenar os resultados
- t = t0;
- theta = theta0;
- w = w0;
- % Loop de tempo
- while t(end) < 100.0
- k1x = w(end);
- k1v = -sign(w(end)) * (((b*L)/m) * w(end)^2) - (g / L) * theta(end);
- k2x = w(end) + k1v * h;
- k2v = -sign(w(end) + k1v *h) * (((b*L)/m )* (w(end) + k1v *h)^2) - (g / L) * (theta(end)+k1x(end)*h);
- % Atualização dos valores de θ e w
- theta = [theta, theta(end) + ((k1x + k2x) / 2.0)*h];
- w = [w, w(end) + ((k1v + k2v) / 2.0)*h];
- % Atualização do tempo
- t = [t, t(end) + h];
- end
- % Cria o gráfico para θ com a linha vermelha
- plot(t, theta, 'r');
- % Adiciona uma linha para w com a linha azul
- hold on;
- plot(t, w, 'b');
- % Adiciona uma legenda
- legend('Theta', 'w');
- % Adiciona títulos aos eixos
- xlabel('tempo (s)');
- ylabel('Theta (rad), w (rad/s)');
- % Exibe o gráfico
- hold off;
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 5 sec ago | 0.10 KB
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 19 sec ago | 0.10 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 44 sec ago | 0.10 KB
-
⭐⭐⭐GMAIL Logs (2FA disabled)⭐⭐
Java | 51 sec ago | 0.10 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 56 sec ago | 0.10 KB
-
⭐⭐⭐ChangeNOW Exploit⭐⭐
Java | 1 min ago | 0.10 KB
-
⭐⭐⭐Instant Profit Method⭐⭐
Java | 1 min ago | 0.10 KB
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 1 min ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand