I want to display a 3x1 table with 3 different variables, which are: n, x, Et
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1320850/image.png)
This is the code where using to find x
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1320855/image.png)
This is the actual code I'm using to find the 3 variables: n, x, and Et. What I'm trying to do is make is to display a table, the first column being the variable n, the second column being the variable x, and the third variable being Et. That's what I want todo.
1 commentaire
Réponse acceptée
Cameron
le 10 Mar 2023
n = input('Cual es el numero de iteraciones?\n');
x = 1;
for i = 1:n
x = (x+2/x)/2;
end
Et = abs((sqrt(2)-x)/sqrt(2));
fig = uifigure;
t = uitable(fig);
t.ColumnName = {'n','x','Et'};
t.Data = [n,x,Et];
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!