Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Include Page
SIMULATION: MATLAB Google AnalyticsSIMULATION:
MATLAB Google Analytics
Include Page
SIMULATION: Structures and Handles - PanelSIMULATION:
Structures and Handles - Panel

...

Let's create the above structure in MATLAB. Start MATLAB. Create a working directory at an appropriate location using the Current Directory window. If you cannot see this window, select Main Menu > Desktop > Current Directory. You can right-click in this window to access the option for creating a new folder (i.e. directory). Browse to this folder to make this your working directory.

...

We use "..." to start a new line. In order for this to work, we, of course, need to allocate strain and stress values to eps_val and sig_val, respectively, abovethis statement. We'll use dummy values that would horrify any self-respecting solid mechanics professor. We do so in order to make the programming aspects easier to understand.

Wiki Markup{{%Testing the use of structure}} {{
clear all; %Clear all variables from workspace}} {{
eps_val = \ [2 7 4\];%Nonsense values}} {{R = values
R = 2*eye(3); %Dummy R}} {{
sig_val = (R*eps_val')';%Derived nonsense}}

In your actual redAnTS implementation, the strains will be derived from the displacements that redAnTS provides from inversion of the stiffness matrix. And you'd have a meaningful R matrix. Note that we specify eps_val as a row vector; we have to use the transpose operator (') to ensure we end up with a row vector for sig_val also.

Save and run your M-file.

The Workspace window shows all the currently defined variables. If you don't see this window, select Main Menu > Desktop > Workspace so that a tick mark appears next to the window name. Double-click on any variable name in the Workspace to take a closer peek at it. Double-clicking on sigepsstruct shows the fields this structure contains.

...