Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Working in Matlab with structures in structures?

3 visualizaciones (últimos 30 días)
Diana Acreala
Diana Acreala el 1 de Feb. de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello all!
I am dealing with a set of parameters. For the moment is possible to 'play' with these parameters, change names and values and save the changes in a new set of parameters (so after any changes is possible to save versions of my set of parameters).
At a given moment this means that I will have, for example 5 versions of my set of parameters.
  1. version1.mat
  2. version2.mat
  3. version3.mat
  4. version4.mat
  5. version5.mat
I am always working with the latest version of the set of parameters (so in this case, version 5).
Let's say in version1.mat I have parameter 'parameter1=5'. I change this parameter name in 'parameter2=5'. So in version2.mat instead of 'parameter1=5' (which will be deleted), I will have 'parameter2=5'. And continuing like this, finally I will have something like:
  1. *version1.mat -> parameter: 'parameter1=5'
  2. version2.mat -> parameter: 'parameter2=5'
  3. version3.mat ->'parameter3=5'
  4. version4.mat ->'parameter4=5'
  5. version5.mat ->'parameter5='*
As I said I am always working with the latest version of my parameters.
Next I want to see a history of all the changes. When I select 'parameter5' I want to see something like I wrote above. Like:
  1. version1.mat -> parameter: 'parameter1=5'
  2. version2.mat -> parameter: 'parameter2=5'
  3. version3.mat ->'parameter3=5'
  4. version4.mat ->'parameter4=5'
  5. version5.mat ->'parameter5=5'
Normally I will never have only 5 versions, is possible to have over 100 versions probably.
How do you suggest to handle this? I was thinking to use structures in strucutures (this solution is ok if I want to see the last, let's say, 3 changes. For more it becomes really complicated to create all the links between all the versions)
  1 comentario
Walter Roberson
Walter Roberson el 2 de Feb. de 2012
If you selected parameter5, why dump the history for all of the parameters?
When you are dumping the history for a particular parameter, do you just want to know which file the parameter was inherited from, or do you want to know only which files it was changed in, or do you want to know the value that would be "perceived" by each of the files?

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by