How to define the 3D output file name and its characteristics in MATLAB

2 visualizaciones (últimos 30 días)
Hello,
The following code is used to save the output 3D model into a particular .inp file for ABAQUS use in Maple code.
setoptions3d(title=`Woven Unit Cell`,style=PATCH, axes=BOXED);
This code is showing errors on MATLAB. It says assigning value needs '==" operator and is not allowing style and axes for the operation to complete. How to convert this for use in MATLAB? Is it possible to specify the same as in the Maple or needs changes?

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Jul. de 2020
title('Woven Unit Cell') ;
box on
Except the command is setting options for surf() and plot3() and scatter3() and patch(), but not for any 2d plot.
MATLAB permits you to set default titles and default box settings, but not to for 2d vs 3d.
  5 comentarios
Walter Roberson
Walter Roberson el 8 de Jul. de 2020
The code in Maple does not require that the setoptions3d be done at the beginning. The code is setting the options for all future 3D plots in Maple (until the workspace is reset). Code that would be equivalent but only for one plot would be to take the plots:-display() call on the maple side and add to it the options title=`Woven Unit Cell`,style=PATCH, axes=BOXED -- so that they would apply to the one call instead of to all future calls.
Requiring that the MATLAB code produce the "exact" behavior of the Maple code is a nuisance, requiring that at the MATLAB level, several Default*CreateFcn callbacks be installed that set the desired options at the time that the 3D plots are created, but not when 2D plots are created. It is surprisingly difficult to reliably figure out whether a call to create a line() object is happening with respect to a plot3() or plot() . And the Maple code itself does not even create any 3D line plots, but in order to produce the "exact" behavior of the Maple code, I have to set up the side effects for all future plotting even though the maple code does not use them. See Bug-For-Bug Compatibility
Vidya Sagar Reddy Kurre
Vidya Sagar Reddy Kurre el 8 de Jul. de 2020
Editada: Vidya Sagar Reddy Kurre el 8 de Jul. de 2020
Hello Walter,
The provided code is very old. Instead of creating exact commands, How can we improve the code using the present advanced level of commands and features in MATLAB? The main aim is to create the model in MATLAB for use in ABAQUS, it is not necassary that we use the exact commands. The model dimenions and the properties as defined are need to be same.
Thank You!! Regards.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by