-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.m
More file actions
34 lines (23 loc) · 725 Bytes
/
Copy pathMain.m
File metadata and controls
34 lines (23 loc) · 725 Bytes
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
%% Universidade Estadual de Campinas
%% IM325 - Metodos Matematicos para Sistemas Mecanicos
%% Autor : Wanderson Vinicius de Oliveira Monteiro
%% Limpeza de memoria
clc; close all;clear
n = 20; % Ordem da matriz de Hilbert
%% Exata
% H = sym(zeros(n)); % cria matriz simbólica
% for i = 1:n
% for j = 1:n
% H(i,j) = sym(1) / sym(i + j - 1);
% end
% end
%% Ponto flutuante
H = zeros(n); % Cria uma matriz de zeros de ordem n
for i = 1:n
for j = 1:n
H(i,j) = 1 / (i + j - 1); % Formula de Hilbert
%% Referencia: https://en.wikipedia.org/wiki/Hilbert_matrix
end
end
% A_inv_Jordan = Gauss_Jordan_Inversa(H,"flutuante")
[A_inv_eqn,H1] = Inversa_Hilbert(n,"flutuante")