Recent content by quetzal

  1. Q

    Importing data from text file into Matlab

    I know about the low-level O/I functions but I really don't know how to handle them. It is something new to me because it is a bit different from the common mathematical programing i was used to. I've done this so far: fid = fopen('cuboid.mfd','r')...
  2. Q

    How to replace zeros in a matrix by elements of an array in Matlab?

    Awesome! I've got it done similarly...Thanks! num=1; for j=1:N for i=1:D if ID(i,j)==1 ID(i,j)=0; else ID(i,j)=EA(num); num=num+1; end end end
  3. Q

    How to replace zeros in a matrix by elements of an array in Matlab?

    Homework Statement I have a matrix that contains zeros but it may contain also ones. For example: ID=[1 0 0 0; 0 0 0 0; 1 0 1 1] I'm trying to replace all the ones by zeros and all the zeros by elements of an array EA going...
  4. Q

    Importing data from text file into Matlab

    Thanks RoshanBBQ! I know that the easiest way is extracting the two matrices manually. But I'm just curious if there exists a command/code to locate them within the text file. I will need to do it many times repeatedly.
  5. Q

    Importing data from text file into Matlab

    Homework Statement I would need some help with extracting two matrices from a text file into Matlab. First is the 60x3 matrix of node coordinates. Second is the 24x8 matrix of node numbers assigned to elements. I have 24 brick elements so each of the elements has 8 nodes. But there are some...
  6. Q

    Calculate the stress in 2 elements

    Homework Statement Let assume that we have two rectangular prism elements of similar dimensions: e.g. 1.) x0=100.1, y0=100.2, z0=90.4 2.) x0=100.2, y0=100.4, z0=90.0 How can I calculate the stress tensor of each of the two elements if I assembly them by merging their z-y faces...
Back
Top