Prev: Regarding Data Acquisition Toolbox
Next: spectrogram
From: ryan olson on 30 Jun 2010 18:56 Helo! I have a matrix G(n,m) and I need to be able to convert it to a dxf file. I am having trouble extrapolating the values in the matrix and turning them into 3 matrices for each dimension x,y,z. I want the value in the matrix to be dimension z and the rows/columns to be x and y respectively. basically, I want to convert the surf(..) of my matrix into it's components so that I can export them as a dxf file using the writedxf.m from paul seigle. first I tried a double for loop to read in the data from the matrix, but then ran into trouble with referencing the rows outside the loops. any ideas? thanks much!
From: sscnekro on 30 Jun 2010 21:06 > I want the value in the matrix to be dimension z and the rows/columns to be x and y respectively. I almost wanted to write reshape() so that you can make 3D out of 2D a.v.v., but then I just looked what reshape really does... and start to wonder where in my codes I've been using it and if it did what I thought it did... a = zeros(2,2,3); for ii = 1:3; a(:,:,ii) = [1,2;3,4]; end; b = reshape(a, 6, 2, 1) c = reshape(b, 3, 2, 2)
From: ryan olson on 1 Jul 2010 12:33 yep the problem is getting the values out of the matrix and still having hem correlate to the specific row/column they came from. I know one way is a double for loop, but I am having trouble finding a way to reference the new matrix for correct index numbering.
|
Pages: 1 Prev: Regarding Data Acquisition Toolbox Next: spectrogram |