Cannot access the "map" function.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Please view screenshot.
3 comentarios
Voss
el 27 de Oct. de 2022
Dear Fred,
Thank you for the map.m file. That's exactly what I needed.
Unfortunately, it looks like that code was written in some fairly old version of MATLAB and has several errors when I try to run it in a more modern version. In addition, it appears to be pretty poorly designed, in my opinion. I don't think it will run properly without significant changes.
Did you download that file from somewhere? If so, maybe there is a newer version available.
Or if you describe the functionality you were looking to use with the map.m program, perhaps I can point you to another, more functional, resource.
Thanks,
Voss
Respuestas (1)
Walter Roberson
el 27 de Oct. de 2022
I have attached a partially revised version of the code. I have fixed the immediate problems with the conversion of handles to double, with a fair bit of modification of the way that data was being saved; I also cleaned up a number of other elements of the code. So the code at least starts now.
In practice, the code still does not work.
- the code initializes two array elements for "frame" but only stores an object into the second of them, but tries to refer to the User data field of the other one as well. An unitialized graphics object does not have a user data field -- not unless you want to say that the unitialized graphics object should be set to the root graphics object, which could be done but is confusing and not the best of ideas. I do not know why two frames are being used there
- the code sets up user data for the initial figure; I revised the handling of that code a fair bit. But it overwrites that user data with user data with a different layout. It does that in a way that would have similar problems to the original code, mixing handle graphics and numeric values. I did not rewrite the handling of that second set of data. If you look at the way I rewrote indexed references to the sh into references to struct fields of sh then you can see what kind of work should be done to handle the other layout. The code apprears to me at the moment to have conflicts between the layouts, but it just might be the case that it is swapping between the two layouts consistently, which could be confusing but workable. I would suggest that the two different layouts be merged into one common layout -- which would be easy if you convert the df user fields to struct like I did for sh
0 comentarios
Ver también
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects 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!