Recent content by darkxynx

  1. D

    MATLAB First time with matlab, inputting cell arrays into function?

    Yep it worked, thanks man. Iwas just going through the code to make sure I understood it and I came across this line Re = zeros(1,b) %preallocate a vector full of zeros for the Re value of each sample (experiment) Why do we have to preallocate a vector for the values that we're going to...
  2. D

    MATLAB First time with matlab, inputting cell arrays into function?

    Hm, so I defined M as a 4x3 matrix, and then I tried to call the function. Is there something wrong with the code? This is the error message I get. Re=viscosity(M) ? Undefined function or method 'viscosity' for input arguments of type 'double'.
  3. D

    MATLAB First time with matlab, inputting cell arrays into function?

    hey thanks for the help. I understood everything up to the part where you began selecting the matrix for input. I think I got it though. So basically, using the size function, i get the number of columns,which is a set of data. With the for loop, it runs through each row, with each indexes...
  4. D

    MATLAB First time with matlab, inputting cell arrays into function?

    Hi I am currently trying to program something that will accept a vector as input for one my function. However, this is my first time programming, and I am relying completely on the internet and the Chapra textbook for help. This is what I have so far: %Re=reynolds number %p = density of...
Back
Top