Can You Implement a Rollback Feature in a MATLAB Program?

In summary, Elbarto has been working on a MATLAB program to solve member forces in a 2d frame structure. He has finally gotten the script to a point where it is working ok, but he would like to be able to "rollback" on a user input. There is a way to do this, but it would be very usefull.
  • #1
elbarto
33
0
Hi,
I have been working on a MATLAB program for solving the member forces in a 2d frame structure which many people have helped me out with on this forum. I have finally got the script to a point where it is working ok and have shown the command window output for a solving a simple frame.

My question is, is there a way you can "rollback" on a user input? My program requires the user make many inputs and it is very easy to make a mistake, which is frustrating because you must then enter the 20+ previous inputs again. So, if there is an option to rollback to the previous input it would be extreamly usefull.

Thank You
Elbarto








<<<<<<<<<<<<<<<<<<Enter Node Geometry, Number of members>>>>>>>>>>>>>>>>>>
Enter Number Of Nodes:3
Enter X Co-Ordinate of Node 1:0
Enter Y Co-Ordinate of Node 1:0
Enter X Co-Ordinate of Node 2:100
Enter Y Co-Ordinate of Node 2:0
Enter X Co-Ordinate of Node 3:200
Enter Y Co-Ordinate of Node 3:-75
Enter Number Of Members:2
Enter Node i for Member 1:1
Enter Node j for Member 1:2
Enter Node i for Member 2:2
Enter Node j for Member 2:3
<<<<<<<<<<<<<<<<<<Section properties>>>>>>>>>>>>>>>>>>
Enter E for material {enter 0 for steel}:1e4
Do you wish to use more then 1 section [y/n]?:n
Enter Area m^2 for all members:10
Enter Second Moment of Area (m^4) for all Members:1e3
<<<<<<<<<<<<<<<<<<Member Releases>>>>>>>>>>>>>>>>>>
Would you like to release the Moment (Mz) of a member [y/n]?:n
<<<<<<<<<<<<<<<<<<Enter in Restraint Data>>>>>>>>>>>>>>>>>>
Enter Restraint Code For Node1 {"1 1 1" is fixed}:1 1 1
Enter Restraint Code For Node2 {"1 1 1" is fixed}:0 0 0
Enter Restraint Code For Node3 {"1 1 1" is fixed}:1 1 1
<<<<<<<<<<<<<<<<<<Enter in apllied load data>>>>>>>>>>>>>>>>>>
Enter Applied load vector {R} For Node1 {"Fx Fy M"}:0 0 0
Enter Applied load vector {R} For Node2 {"Fx Fy M"}:0 -10 -1000
Enter Applied load vector {R} For Node3 {"Fx Fy M"}:0 0 0
<<<<<<<<<<<<<<<<<<FIXED END ACTIONS>>>>>>>>>>>>>>>>>>
Are there any member loads (ie Fixed end actions) [y/n]?:y
Enter members with applied member loads ie (# # #):1 2
Enter point loads at mid span for member_1 (Fx Fy) GLOBAL:0 0
Enter point loads at mid span for member_1 (fx fy) LOCAL:0 0
Enter Distributed load for member_1 (w) LOCAL:-0.2
Enter point loads at mid span for member_2 (Fx Fy) GLOBAL:0 -20
Enter point loads at mid span for member_2 (fx fy) LOCAL:0 0
Enter Distributed load for member_2 (w) LOCAL:0
............
RESULTS
............
Nodal Displacments {rf}
r2x = -0.019
r2y = -0.09408
theata_2 = -0.001826
............
Support Reactions {Rs}
R1x = 19
R1y = 10.33
M1 = 365.8
R3x = -19
R3y = 39.67
M3 = -875
............
Basic Member Forces {S}
Mi1 = 365.8
Mj1 = -332.8
F1 = -19
.
Mi2 = -667.2
Mj2 = -875
F2 = -39
.
............
 
Physics news on Phys.org
  • #2
hi.. can i have a copy of your source codes?
cprelator@yahoo.com
would really appreciate your help.
 
  • #3
elbarto, here's something to think about that might be helpful to you. Break up your code into logical sections, with the first section getting user input. After the user has entered all 20+ input values, present them all to the user in a numbered list, and ask him/her to confirm that they are correct. If so, continue as before. If not, ask the user which input to change by typing the number of the one to change. After each change, ask whether the user wants to change another value.

When the user is satisfied with the changes, control flow proceeds as before.
 
  • #4
Hi mate, can i have a copy of your source codes?
m.s.ayubirad@gmail.com
would really appreciate your help.
 
  • #5

Member End Actions {R}
R1i = 0
R2j = 0
Fi = 19
.
R2i = 0
R3j = 0
Fj = 39

Hi Elbarto,

First of all, congratulations on successfully developing a MATLAB program for solving member forces in a 2D frame structure. It's great to see that you have received help from others on this forum and have now reached a point where your script is working well.

To address your question about "rollback" on user input, I would suggest implementing a "undo" or "back" feature in your program. This would allow the user to go back to the previous input and make corrections without having to re-enter all the previous inputs. This can be achieved by storing the previous input values in variables and using a conditional statement to check if the user wants to go back. If they do, the program can retrieve the previous input values from the variables and continue from there.

Another option could be to allow the user to edit their previous inputs before moving on to the next one. This way, they can make corrections without having to go back and re-enter everything.

I hope this helps. Keep up the good work with your program!
 

Related to Can You Implement a Rollback Feature in a MATLAB Program?

1. What is Frame Solver and how does it work?

Frame Solver is a MATLAB program designed to solve structural analysis problems. It uses the finite element method to discretize the structure into smaller elements and then uses equations of equilibrium to solve for the unknown displacements and internal forces in the structure.

2. Can Frame Solver handle complex structures and loading conditions?

Yes, Frame Solver is capable of analyzing both simple and complex structures, including those with irregular geometry and varying loading conditions. It can handle various types of loading such as point loads, distributed loads, and moments.

3. What are the key advantages of using Frame Solver over other structural analysis software?

Some key advantages of Frame Solver include its user-friendly interface, efficient solution algorithms, and the ability to customize and extend the program through MATLAB scripting. It also offers advanced visualization options to help users better understand the results.

4. Is there any prior knowledge or experience required to use Frame Solver?

While some basic knowledge of structural analysis principles is recommended, no prior experience with MATLAB or other structural analysis software is necessary to use Frame Solver. The program comes with detailed documentation and tutorials to help users get started.

5. Can Frame Solver be used for both static and dynamic analysis?

Yes, Frame Solver can handle both static and dynamic analysis. It can analyze structures under different types of loading conditions, including time-varying loads and seismic loads. The program also offers options for modal analysis and dynamic response analysis.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
25K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
14K
Replies
4
Views
7K
  • Introductory Physics Homework Help
Replies
1
Views
2K
Replies
11
Views
27K
  • Introductory Physics Homework Help
Replies
3
Views
5K
Back
Top