how to create a table in Matlab ?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yamina chbak
el 28 de Jul. de 2020
Respondida: Steven Lord
el 28 de Jul. de 2020
I have Error L1,L2 and Linf between exacte solution and numerique solution of PDE for differents alpha and dt values in Matlab code.
I went to create a table has a muliple ligne, like that
alpha dt Error L^1 Error L^2 Error L^inf
------------- ------ -------------- ----------- -----------
1.0 0.05 ? ? ?
0.8 0.05 ? ? ?
0.5 0.05 ? ? ?
0.2 0.05 ? ? ?
0 comentarios
Respuesta aceptada
Jon
el 28 de Jul. de 2020
Editada: Jon
el 28 de Jul. de 2020
You can do something like this
x = [1;0.8;0.5;0.2]
dt = [0.05;0.05; 0.05;0.05]
EL1 = [3; 4; 5; 6 ]
t = table(x,dt,EL1)
There are lots of options for defining a table, the above is a simple example of how to do it. Please type doc table on the command line to see all of the detailed possibilities.
0 comentarios
Más respuestas (1)
Steven Lord
el 28 de Jul. de 2020
In release R2016b (the release with which this answer was marked) table variable names must be valid MATLAB identifiers, which means neither spaces nor carets (^) are allowed. This restriction was removed in release R2019b so if you want to use those variable names you will need to upgrade to release R2019b or later.
0 comentarios
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!