Matlab Appdesigner save('xxx.mat') command won't work

  • Thread starter Thread starter mastermechanic
  • Start date Start date
  • Tags Tags
    Matlab Work
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 1K views
mastermechanic
Messages
107
Reaction score
15
Homework Statement
It's an Finite Element Method homework to write a code for stresses of the bar and to create a GUI for that.
Relevant Equations
EL = represents Element Matrix but it contains properties of the specific element.
At the start up section I initialize a matrix like:

EL = [ ];
save('EL.mat',"EL");

-------------------------------------------------- This part is okay it creates and saves an empty matrix.

But later, when a button pushed it should record the values of the edit box like:

(This is the section under the app.buttonpushed)

load('EL.mat');
EL = [EL; young_mod length ang];
save('EL.mat', "EL");

---------------------------------------- everything in this buttonpushed section works except this one because when I write load('EL.mat') into command window it returns an empty matrix. I even wrote fprintf('abc'); above load('EL.mat') but it didn't print it.

It made me crazy, it does not read the specific portion of the code and just skips it. I also share the code for you. Please enlighten me.
 

Attachments

  • 1.jpg
    1.jpg
    80.9 KB · Views: 250
Physics news on Phys.org
I found the problem it's a foolish mistake :) I had a reset section between the saving and loading part and it was resetting all the variables. Problem solved.