Este artigo descreve um programa de computador em MATLAB para a obtenção de um polinômio de ajuste dos quadrados mínimos, condicionado a passar por um conjunto arbitrário de nodos de ancoramento, contanto que ainda retenha um conveniente número de graus de liberdade.
O ajustamento polinomial a dados experimentais pelo método de quadrados mínimosé muito usado, e aqui estudamos a introdução de uma simples modificação, que, em certos casos,é mais adequada, istoé, condicionamos o polinômio a conter um dado ponto. Incluímos uma implementação do correspondente algoritmo em Matlab. Palavras-chave: ajustamento, quadrados mínimos, condicionamento.Since the least-squares polynomial fit is used very often, we study here a simple modification that is more suitable for some cases, that is, we constrain the polynomial to pass through a given point, besides satisfying the least-squares property. We include an implementation of the corresponding algorithm in Matlab. Keywords: data fitting, least squares, constraint. IntroduçãóE popular o ajustamento polinomial discreto dos quadrados mínimos (q. m.). Para evocar o processo desse ajustamento, consideremos os dados da Tabela 1, onde a primeira linha forma uma seqüência finita crescente.Tabela 1 -Dados a ajustar.Suponhamos que queiramos ajustar a esses dados o polinômiode ordem k ≤ n dos q. m. A melhor maneira de obter a soluçãoé o uso daálgebra linear como segue. Começamos gerando a matriz de planejamento (designde ordem (n + 1) × (k + 1), determinada pelo vetorA soluçãoúnica (porque Xé não-singular) da equação normal (3), o uso da matriz de planejamento pode levar a imprecisões uma vez que X se torna mal-condicionada quando sua ordemé alta. No entanto, isso nãoé relevante na maioria dos casos práticos, onde dificilmente a ordem do polinômio ajustadoé maior que 3.O desenvolvimento mais completo da teoria e solução numérica dos quadrados mínimos foi feita por Ake Björck em [2], mas pode ser encontrado em muitos bons livros deálgebra linear, como [3,4,5]. Uma introdução rápida sobre a solução dos q. m. encontra-se em [6].Façamos aqui uma pequena digressãoútil. Na estimativa da solução Xa = y mediante o método dos q. m.,é convenienteàs vezes ponderar essa estimativa, istó e, usar e equação normal ponderada
O ajustamento polinomial a dados experimentais pelo método de quadrados mínimosé muito usado, e aqui estudamos a introdução de uma simples modificação, que, em certos casos,é mais adequada, istoé, condicionamos o polinômio a conter um dado ponto. Incluímos uma implementação do correspondente algoritmo em Matlab. Palavras-chave: ajustamento, quadrados mínimos, condicionamento.Since the least-squares polynomial fit is used very often, we study here a simple modification that is more suitable for some cases, that is, we constrain the polynomial to pass through a given point, besides satisfying the least-squares property. We include an implementation of the corresponding algorithm in Matlab. Keywords: data fitting, least squares, constraint. IntroduçãóE popular o ajustamento polinomial discreto dos quadrados mínimos (q. m.). Para evocar o processo desse ajustamento, consideremos os dados da Tabela 1, onde a primeira linha forma uma seqüência finita crescente.Tabela 1 -Dados a ajustar.Suponhamos que queiramos ajustar a esses dados o polinômiode ordem k ≤ n dos q. m. A melhor maneira de obter a soluçãoé o uso daálgebra linear como segue. Começamos gerando a matriz de planejamento (designde ordem (n + 1) × (k + 1), determinada pelo vetorA soluçãoúnica (porque Xé não-singular) da equação normal (3), o uso da matriz de planejamento pode levar a imprecisões uma vez que X se torna mal-condicionada quando sua ordemé alta. No entanto, isso nãoé relevante na maioria dos casos práticos, onde dificilmente a ordem do polinômio ajustadoé maior que 3.O desenvolvimento mais completo da teoria e solução numérica dos quadrados mínimos foi feita por Ake Björck em [2], mas pode ser encontrado em muitos bons livros deálgebra linear, como [3,4,5]. Uma introdução rápida sobre a solução dos q. m. encontra-se em [6].Façamos aqui uma pequena digressãoútil. Na estimativa da solução Xa = y mediante o método dos q. m.,é convenienteàs vezes ponderar essa estimativa, istó e, usar e equação normal ponderada
Este artigo descreve um programa de computador em MATLAB para a obtenção de um polinômio de ajuste dos quadrados mínimos, condicionado a passar por um conjunto arbitrário de nodos de ancoramento, contanto que ainda retenha um conveniente número de graus de liberdade. Palavras-chave: ajustamento, quadrados mínimos, condicionamento.The article describes a computer program in MATLAB for obtaining a least-squares polynomial fit, constrained to pass through an arbitrary set of anchorage nodes, provided a sufficient number of freedom degrees is retained. Keywords: data fitting, least squares, constraint. IntroduçãoEm recente artigo [1] mostramos queé possível determinar um polinômio de ajuste dos quadrados mínimos (QM) preestabelecendo que contenha um nodo de ancoramento (um ponto fixado; a origem, por exemplo). Chamamos a um polinômio de ajuste desse tipo de polinômio dos quadrados mínimos condicionado (PQMC) ou ancorado. Nos comentários finais do citado artigo dissemos que se poderia tentar desenvolver um algoritmo que obrigue o polinômio a passar por um conjunto arbitrário de nodos de ancoramento, contanto que ainda retenha um número de graus de liberdade suficientemente elevado. Recentemente conseguimos obter um algoritmo para o PQMC com um número t qualquer de nodos de ancoramento. A Fig. 1 ilustra um exemplo de ajustamento do PQMC de ordem m = 4 ancorado em t = 2 nodos. AlgoritmoSegue o algoritmo, implementado na linguagem do MATLAB. Para auxiliar a compreensão, intercalamos explicações detalhadas de diversos passos desse algoritmo. O algoritmo tem, como dados de entrada, os vetores das abscissas x = [x 1 , . . . , x n ] T e ordenadas y = [y 1 , . . . , y n ] T dos n dados (dados experimentais, por exemplo), os vetores das abscissas u = [u 1 , . . . , u t ] T e ordenadas w = [w 1 , . . . , w t ] T dos t nodos de ancoramento (pontos que certamente pertencemà função teórica, por exemplo) e a ordem m do PQMCa determinar. Quase sempre a ordem coincide com o grau do polinômio, mas algumas vezes, muito raramente, o graué menor que a ordem; isso acontece quandoé nulo o coeficiente p 1 .% Dados e nodos de ancoramento n = length(x) % Número de pontos que constituem % os dados t = length(u) % Número de nodos de ancoramento if m < t error('m DEVE ser no mínimo igual a t.') endNo MATLAB, o comando length(x) determina o tamanho (número de componentes) do vetor x. Para que haja algum grau de liberdade do ajustamento polinomial ancorado, a ordem m do PQMC não deve ser
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.