home

PDF (letter size)

some of my matlab functions, GUI apps and Matlab scripts

Nasser M. Abbasi

May 27, 2022   Compiled on September 10, 2023 at 7:43am

zip files are build such that each is self contained with all the needed matlab files and .fig file (if applicable) to run each application or function from the directory created once the zip file is unzipped

Work in progress, this page is updated all the time.

No.

file name

depend

zip

description

1

COMPUTED TOMOGRAPHY, MATHEMATICS AND SIMULATION using Matlab

2

implementation of LU Decomposition and Linear Solver using Matlab

3

Small Matlab GUI untility to change units of a Matlab .fig file. Make sure to save a copy of your fig file before using, just in case. HTML

4

nma_185_proj3.m

depend

zip

Solve Lotka-Volterra 2-ODE system

5

nma_CG.m

depend

zip

conjugate gradient with pre-conditioning solver

6

nma_CG_GUI_TEST.m

depend

zip

GUI for conjugate gradient solver

7

nma_CG_TEST1.m

depend

zip

driver function for nma_CG

8

nma_CG_TEST2.m

depend

zip

another driver for nma_CG.m

9

nma_FDM_matrix_laplace_1D_Neumann_scheme_1.m

depend

zip

builds finite difference A matrix for 1-D laplace

10

nma_FDM_matrix_laplace_1D_Neumann_scheme_2.m

depend

zip

builds finite difference A matrix for 1-D laplace nuemman boundary conditions

11

nma_FDM_matrix_laplace_1D_dirichlet.m

depend

zip

builds finite difference A matrix for 1-D laplace dirichlet boundary conditions

12

nma_FDM_matrix_laplace_1D_robin.m

depend

zip

builds finite difference A matrix for 1-D laplace

13

nma_GENP2D.m

depend

zip

generate A and f for the \(Au=f\), to solve for u on 2D based on 5 points laplacian.

14

nma_HW2_math_228B_problem3.m

report

depend

zip

solves the FitzHugh-Nagumo on unit square

15

nma_ISSPD.m

depend

zip

checks that matrix is SPD

16

nma_ISSYM.m

depend

zip

checks that matrix is symmetrix

17

nma_LaxWendroff.m

depend

zip

Class implements Lax-Wendroff for 1D advection PDE

18

nma_LaxWendroff_test.m

depend

zip

driver tests nma_LaxWendroff class

19

nma_MAE121_spring_2010_lab4.m report

depend

zip

lab4 assignment MAE121 dynamics, UC david

20

nma_MAE121_spring_2010_lab4Main.m

depend

zip

called by GUI to implement the numerical solution for Lab4 UC davis

21

nma_P2DDIRJCB_S.m

depend

zip

script solves 2D Poission PDE on unit square using Jacobian iterative method

22

nma_P2DDIRSOR.m

depend

zip

Solve 2D poisson PDE on unit square. Dirichlet B.C

23

nma_P2DDIRSOR_S.m

depend

zip

script solves 2D poisson on unit square, zero boundary conditions, SOR method

24

nma_PDE_parabolic_explicit_rod.m

depend

zip

solves parabolic PDE using explicit method

25

nma_PDE_parabolic_explicit_rod_TEST.m

depend

zip

driver for nma_PDE_parabolic_explicit_rod()

26

nma_PDE_parabolic_explicit_rod_with_rate_BC.m

depend

zip

solve parabolic PDE using explicit method for changing boundary conditions

27

nma_PDE_parabolic_explicit_rod_with_rate_BC_TEST.m

depend

zip

driver for nma_PDE_parabolic_explicit_rod_with_rate_BC()

28

nma_RK4.m

depend

zip

solve 1st order ODE using Runge-Kutta classical 4th order

29

nma_SD.m

depend

zip

function solves \(Au=f\) using the method of steepest descent.

30

nma_V_cycle.m

depend

zip

implement multigrid V Cycle

31

nma_advection_pde_1D.m report

depend

zip

implement HW3, Math 228B, advection ODE solver

32

nma_arrow.m

depend

zip

draws an arrow annotation on figure

33

nma_c2f.m

depend

zip

implements coarse to fine grid bilinear interpolation mapping

34

nma_change_figure_units.m

depend

zip

GUI main for changing figure unit program

35

nma_check_all_zero_boundaries.m

depend

zip

auxiliary function to validate boundary conditions

36

nma_controller_sim.m

depend

zip

main GUI file for controllor simulation

37

nma_diffusion_1d.m

depend

zip

main GUI file for 1D diffusion solver

38

nma_eme_121_lab1.m report

depend

zip

main GUI file for lab1 MAE121, UC davis

39

nma_euler_heun.m

depend

zip

Solve ODE using Euler-Heun (corrector-predictor method)

40

nma_euler_heun2.m

depend

zip

Solve ODE using Euler-Heun (corrector-predictor method)

41

nma_euler_midpoint.m

depend

zip

solve ODE using Euler-mid-point algorithm

42

nma_evaluate_1D_function.m

depend

zip

evaluates string as 1D function for boundary conditions

43

nma_f2c.m

depend

zip

restriction operator for fine grid to a coarse grid full weight mapping on 2D

44

nma_findAlphaForMinDeltaV.m

depend

zip

Finds initial inclincatin correction for orbit relative to a larger circular orbit

45

nma_findPointOnLine.m

depend

zip

helper function for rocket design project

46

nma_find_norm.m

depend

zip

find the grid norm

47

nma_find_residue.m

depend

zip

calculates residue

48

nma_format_matrix.m

depend

zip

prints matrix of numerical data with headings in formatted way

49

nma_gen2Ddirch.m

depend

zip

helper function to generate A,b for solver

50

nma_generate_A_and_ARHS_for_2D_diffusion_Neumman.m

depend

zip

generate the A and B matrices used by the ADI solver.

51

nma_generate_dep_files.m

depend

zip

This function generates one text file for each m file it finds in the same folder it is running from. For each m file it finds, it generates the text file which contains a list of the m files that the current m file depends on.

This uses fdep() function from matlab central feb 13, 2012

52

nma_generate_dep_files_V2.m

depend

zip

This function generates one text file for each m file it finds in the same folder it is running from. For each m file it finds, it generates the text file which contains a list of the m files that the current m file depends on.

This uses fdep() function from matlab central

march 1, 2013 clean up more, moved to htlatex Nov 22, 2012

53

nma_getDeltaTimeFromDeltaNu.m

depend

zip

calculates time of flight for the orbit moving from nu0 to nu.

54

nma_getFlux1.m

depend

zip

flux function for PDE numerical course, UC Davis

55

nma_getOrbitParams.m

depend

zip

find orbit parameters from the velocity and position vectors

56

nma_getUniversalVariable.m

depend

zip

compute the Universal Variable X for an orbit

57

nma_get_index.m

depend

zip

helper function to find index

58

nma_inputNumeric.m

depend

zip

read a numeric number from user and keeps trying untill the user types correct value

59

nma_lab2_eme_121.m report

depend

zip

main GUI file for lab2 MAE 121 UC Davis

60

nma_lab3_eme_121.m report

depend

zip

main GUI file for lab3 MAE 121, UC Davis

61

nma_lap1d.m

depend

zip

helper function to make sparse matrix

62

nma_lap2d.m

depend

zip

helper function to make sparse 2D matrix

63

nma_lap3d.m

depend

zip

generate 3D sparse matrix for poisson 3D

64

nma_laplaceRectDirchlet.m

depend

zip

solve laplace PDE for rectangular region Dirclet BC

65

nma_laplaceRectDirchletBendCorner.m

depend

zip

solves laplace PDE for rectangular region Dirclet BC

66

nma_laplaceRectNuemann.m

depend

zip

solves laplace PDE for rectangular region Nuemann BC

67

nma_math228.m

depend

zip

main GUI file for all my math 228 other GUI apps

68

nma_math228b_HW2_prob2.m

depend

zip

implements the refinement study for HW2, ath 228B UC Davis

69

nma_math_228b_HW4_parblem_1_part_b.m report

depend

zip

Lax-Wendroff to solve the wave equation

70

nma_math_228b_HW4_problem_3.m

depend

zip

solves diffusion problem \(u\_t + a * u\_x = 0\) using finite volume method with flux limiter functions

72

nma_modal_v2.m

depend

zip

solves 3 bars and 2 springs with IC using modal analysis based solution

73

nma_moveProbe.m

depend

zip

Moves probe in an orbit for deltaTime

74

nma_orbit_simulator.m

depend

zip

main GUI file for orbit simulator

75

nma_plot_stress_diagram_in_2D_script.m

depend

zip

script to plot stress diagram, plain stress

76

nma_poisson_GUI.m report

depend

zip

main GUI file for poisson 2D solver

77

nma_process_eme_121_lab1.m

depend

zip

called by the Matlab GUI to solve equation of motion Lab 1 MAE 121

78

nma_rect_pulse_on_periodic_1D.m

depend

zip

class implements the rectangular pulse used in implementation of HW3, Math 228B.

79

nma_rectangle.m

depend

zip

make an annotation of a rectangle

80

nma_refinement_study_manager.m

depend

zip

class used for doing refinement study for my math 228 numerical PDE class

81

nma_relax.m

depend

zip

does one iteration relaxation, called by V cycle for multigrid solver

82

nma_rescale.m

depend

zip

Nasser M. Abbasi 011212 NO ERROR CHECKING DONE ON INPUT. Rescale a matrix or a vector A

83

nma_rocket_design.m

depend

zip

design rocket from earth to GEO

84

nma_rocket_design_PERMUTE.m

depend

zip

helper function for rocket design project, UCI

85

nma_rocket_getLagrangeMultiplier.m

depend

zip

Solves equation 5.57 in book orbital mechanices page 96, by Prussing and Conway

86

nma_rocket_mutliStageSolutionLagrange.m

depend

zip

design for a multi-stage rocket.

87

nma_rocket_solveRocketEquationOneStage.m

depend

zip

Solves for Mp (mass of properellent) and Ms (mass of structure) for a given one stage rocket.

88

nma_rocket_solveRocketEquationOneStage_form2.m

depend

zip

Solves rocket equation for delta V, mass of properellent and mass of structure and payload

89

nma_rocket_solveRocketEquationOneStage_form3.m

depend

zip

Solves rocket equation for delta V, mass of properellent and mass of structure and payload

90

nma_romberg.m

depend

zip

generate the Romberg integration table

91

nma_romberg_test.m

depend

zip

driver to test romberg integration table

92

nma_runProbeSimulation.m

depend

zip

runs simulation of probe starting from some position and velosity vector for some delta time

93

nma_set_figure_position.m

depend

zip

utility function, called to create a figure in middle of window

94

nma_solveProb_43.m

depend

zip

solves HW problem 4.3

95

nma_solve_2D_diffusion_ADI.m

depend

zip

Solves 2D diffusion PDE \(u\_t = D (u\_xx+u\_yy)\) on unit square Neumann BC using cell centered grid points and ADI schem

96

nma_solve_2D_diffusion_ADI_TEST_script.m

depend

zip

script to solve 2D diffusion

97

nma_solve_gauge_ODE.m

depend

zip

solves \(w\_t = epsilson(w-gamma w)\) for problem 3, HW 2, Math 228B UC Davis

98

nma_solve_reaction_ODE.m

depend

zip

solves the reaction ODE part of the FitzHugh-Nagumo equations

99

nma_solver_Vcycle.m

depend

zip

Solve poisson 2D pde on unit square zero BC using multigrid V cycle method

100

nma_spline.m

depend

zip

computes the cubic splines between any number of points.

101

nma_spline_test.m

depend

zip

driver for cubic splines using the improved method.

102

nma_spring.m

depend

zip

static class to make spring for plotting animations

103

nma_steady_state.m

depend

zip

simulation of steady state single degree of freedom system with harmonic input

104

nma_testfindAlphaForMinDeltaV.m

depend

zip

driver to test findAlphaForMinDeltaV

105

nma_trapezoidal.m

depend

zip

integrate a function using trapezoidal rule using specific number of strips.

106

nma_using_ffteasy.m

depend

zip

107

nma_validate_dimensions.m

depend

zip

auxiliary function used by other function to validate input dimensions are consistent.

108

nma_validate_dimensions_1.m

depend

zip

auxiliary function validates input dimensions consistent for 1D only

109

nma_verify_valid_non_negative_numeric.m

depend

zip

verifies string represents non negative number

110

nma_verify_valid_numeric.m

depend

zip

verfies input string represents a numerical value

111

nma_verify_valid_positive_integer.m

depend

zip

verifies input string represents positive integer

112

nma_verify_valid_positive_numeric.m

depend

zip

verifies input string represents positive number

113

nma_zoom_image.m

depend

zip

zoom a gray image by factor and return new image

114

source file implement steepest descent

zip

pict