I have a surface created with TriScatteredInterp, exactly as in the example here: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html Now i need a 2D line plot of the intersection of a vertical plane with this surface. This should be a very common problem, just the depth/elevation profile of a surface along a line, but I cannot find an example.

0 |

11/19/2009 7:20:22 PM

"Noel Black" <tex.noel@gmail.com> wrote in message news:he45pm$1qv$1@fred.mathworks.com... >I have a surface created with TriScatteredInterp, exactly as in the example >here: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html > > Now i need a 2D line plot of the intersection of a vertical plane with > this surface. This should be a very common problem, just the > depth/elevation profile of a surface along a line, but I cannot find an > example. Hi Noel, When viewed from the Z direction your slice plane is line in the X-Y plane. You just need to create a poly-line in the X-Y plane, compute the corresponding values on the surface and plot them. Here's an example that refers to the same data set; Let's take a line that goes from (-2,-2) to (2,2) in the X-Y plane The poly-line is as follows; xl = (-2:0.25:2)'; yl = (-2:0.25:2)'; % Now evaluate the elevation on the surface zl = F(xl,yl); % Next plot the line on the surface % Due it sampling inaccuracies the line will weave above and below the surface facets. % I will lift it up a tad to make the plot look pretty mesh(qx,qy,qz); zl_lifted = zl + max(zl)*0.05; hold on; plot3(xl,yl,zl_lifted, '-k', 'LineWidth',1.4) hold off How's that? Damian

0 |

11/20/2009 4:22:01 PM

"Noel Black" <tex.noel@gmail.com> wrote in message <he45pm$1qv$1@fred.mathworks.com>... > I have a surface created with TriScatteredInterp, exactly as in the example here: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/triscatteredinterpclass.html > > Now i need a 2D line plot of the intersection of a vertical plane with this surface. This should be a very common problem, just the depth/elevation profile of a surface along a line, but I cannot find an example. give a look at this: http://www.mathworks.com/matlabcentral/fileexchange/10408-contours-for-triangular-grids http://www.advancedmcode.org/

0 |

12/8/2009 12:24:02 PM

I have data files that are: 34 columns a heck of a lot of rows! I need to read in the data (skipping the first 14 lines of header) to an array. I do have a way to do this, but I have found that it slows down on my large files. What I've done and it works, is: temp = textread(filename, '%f', 'headerlines', numOfHeaderLines) -- for i = 1:(size(temp)/34) for j = 1:34 dat(i,j) = temp(34*(i-1)+j); end end -- This reads in all the data to a 1D array of an enourmous length and then converts it to the 34 column 2D array....

What is the best way to write static 2D data to a Canvas3D? For example, if I wanted to draw a title centered at the top of my screen (which would be positioned relative to the dimensions of it's AWT container rather than scene geometry), what would be the best way to do this? Reading through the docs has left me confused as to the best way to do this. Mark McKay -- http://www.kitfox.com ...

I want to plot multiple series of data points in Mathematica 6. Each data point has an error bar. ErrorListPlot plots only a single list. Is there a way to plot multiple lists with error bars? Thanks. Kezhao Hi Kezhao, ErrrorListPlot can deal with multiple datasets.E.g.: d1=Table[{i,RandomReal[]},{i,0,20}]; d2=Table[{.5i,RandomReal[]},{i,0,20}]; ErrorListPlot[{d1,d2}] hope this helps, Daniel Kezhao Zhang wrote: > I want to plot multiple series of data points in Mathematica 6. Each > data point has an error bar. ErrorListPlot plots only a single...

Hi all. I have a data file with 2 columns for X and Y values. I want to plot delta = Y vs X, i.e. at each point I'll have y(i)-y(i-1) for the current y value an= d x(i) for the x value. I think this is related to the running average exam= ple, but I couldn't figure it out on my own.=20 I should add that sure, I can preprocess my data file and calculate the nee= ded values, but I'm looking for a gnuplot-only solution.=20 Any help is appreciated, Cheers, Victor. On 20.07.2011 01:27, Victor wrote: > I have a data file with 2 columns for X and Y values. I want > to p...

! ! ! TEST BANKS, SOLUTION MANUALS, INSTRUCTOR MANUALS, CASE SOLUTIONS, POW= ER POINT SLIDES ! ! ! Hello Everybody, To get the Solution manuals and Test banks just email me with your book det= ails. My e-mail address is: testbankandsm@xxxxxxxxx, testbankandsm(at)gmail(dot)c= om. Please replace (at) by @ and (dot) by .=20 If you need Test banks and Solution manuals, email to me.=20 http://testbankandsm.blogspot.in/ Reply time: Within 6 hours, If online, immediately!!!! Delivery time: Within 12- 24 hours. If online, immediately after payment ve= rification!!!!!!!!! Having...

Hi all, I want to pass 2D array to sub function and return 2D array. //-------------------------- For example, use strict; use warnings; my @array=([1,2,3],[4,5,6],[7,8,9]); my $array_ref = \@array; $array_r = increase_array_element($array_ref); sub increase_array_element { //recover the 2D array my @array_tmp = @{$array_ref}; print $array_tmp[2][2]; return \@array_tmp; } //------------------------- But it seems the compile did not think @array_tmp is a 2D array? Thanks! Davy "Davy" <zhushenli@gmail.com> wrote in message news:1154593889.794457.16810@m79...

I have to plots P1 and P2 generated form 2 matrices [2x36000]. How can I generate 3rd plot or data matrix with the sum of y values from P1 and P2 in different ratios? ...

On 10/26/07 at 5:20 AM, johnlee_15@hotmail.com (John Lee) wrote: >I have a table of x values and a separate table of corresponding y >values. Is there a way to plot these values directly without using >MapThread and without creating a new table to store the x and y >values? ListPlot[Transpose@{x,y}] -- To reply via email subtract one hundred and four ...

Hello, I am now setting up a 2D array (3X200) and want to do a finite differencing. I know how to iterate in 1D but the array that I have now looks like this. [Ai,j Ai,j+1 Ai,j+2 Ai+1,j Ai+1,j+1 Ai+1,j+2 ------------------------------------ ------------------------------------ ----------------------------------- Ai+200,j Ai+200,j+1 Ai+200,j+2] How do I iterate in 2D so that the finite differencing can be done using a while statement? Thanks, Mahesh You can iterate in N dimensions as the same way as you iterate in 1D. For example: array=FIN...

Hi Some time ago now I wrote a simple program in C++ to simulate the 2d ising model on a square lattice which could calculate various quantities such as specific heat capacity and so on. I started thinking about this code again recently and thought that I might like to extend it a little. For example I was considering altering the lattice from the square one that everyone seems to do to a triangular one. I am sure that this has been done before and I was wondering if anyone out there knows if I would see any different physics - such as will the transition temperature change and so on. The...

Hi, I have set of 2D points Pi(x,y), i=1.....n. I want to join all of them, so that total distance between them is going to be minimal. erazem Erazem Polutnik wrote: > Hi, > I have set of 2D points Pi(x,y), i=1.....n. I want to join all of them, so > that total distance between them is going to be minimal. "Travelling salesman problem". Google. Cheers, Nicholas Sherlock Sounds more like a minimum spanning tree problem... Arash Partow __________________________________________________ Be one who knows what they don't know, Instead of being one who knows not w...

Hi, I am new to MATLAB mapping tool. I have latitude-longitude information and corresponding precipitation data for each station. I need to produce US map and superimpose precipitation distribution corresponding to at each latitude and longitude. Let me know how to do so. Thanks, ...

Does anyone here think that Civ3, riding on the back of a franchise, and Commandos III, are the last hand-drawn, 2D games that were deemed worthy of implementation? I hope not. A third dimension can be merry hell to program and quite humiliating if it plays no special role in your game. I'd like to implement a game that looks like a cross between Age of Empires and The Sims, and, professional though the tech demo looks, I really don't see anything with a similar 2D look to it on the market. Any thoughts? Do you think anyone would look at Age of Empires now and instantl...

I want to read some image to run a C++ MEX function to process this image. The image is originally stored as a Matlab 3D matrix, and then converted to a 2D matrix and each slice of the image is stored as a 1D vector. Here is some example codes below. 1. The MEX function: include "mex.h" void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { unsigned int** ubuff; size_t col_ubuff = mxGetN(prhs[0]); size_t row_ubuff = mxGetM(prhs[0]); ubuff = (unsigned int **)mxCalloc(col_ubuff, row_ubuff); for(int x = 0; x < col_ubuff;...

A feature story in, of all places, the Centerville Daily Iowegian of Centerville, Iowa has a nice photograph of the Linotype machine once used at the newspaper. The story, which is about a Linotype operator from Chicago who moved to southern Iowa to retire is at: <http://www.dailyiowegian.com/homepage/ local_story_356101353.html?keyword=leadpicturestory> A better version of the photo is: <http://www.dailyiowegian.com/homepage/ images_sizedimage_356101426/resources_photoview> (Apologies for the line breaks; my newsreader doesn't permit long lines to be posted.) I recall that...

Hi - I am looking for sources of any kind that have to do with modelling objects, specifically organic molecules and are 3D, in a 2D relational database. Can anyone suggest anything? Thanks, Doug C. Doug C wrote: > Hi - I am looking for sources of any kind that have to do with > modelling objects, specifically organic molecules and are 3D, in a 2D > relational database. Can anyone suggest anything? The first thing you need to observe is that relational databases are not 2D. A dimension is a measure independent of any other dimensions. The columns of a relational t...

Hi All, I'm scattering a huge data [4000 points], belong to 8 different classes. some classes are overlap. due to this large number of data, the legend is not suitable to me, (because i need to show these figure in small pages). is there any way to shade the areas of different classes with different colors or shadows instead. Thank you very much Mike ...

hi, I am having a m x n matrix of 275 x 275. where m is the number of scanned frame and n is the actual data. I am scanning an object by a laser and detecting the edges and storing the radius component in the column of the matrix. The object I am scanning is somewhat like cylinder. but the radius keeps changing. so each frame has different values. I tried to plot matrix by cylinder function but the radius is overlooked by the largest one of all the frames. is there anyway i could plot the object in 3d with varying radius. ...

Hello together, I have a picture in following format: "496*784 uint 16" This is nice to handle, but I want to have a single array with 388864 Elements, representing the data. Then, I�ll do some Operation to the array. After finnished operation I want to transform the 388864 Elements back to a 2D Array consisting 496*784 Elements. ??? How can this be done with Matlab functions ??? Thank you very much, Kevin Hi there, try 'reshape' and perform your calculation, then reshape back. e.g. a = reshape(x,newN,newM) Yang K.Ostheimer wrote: > > > Hello together, >...

US-AZ-Tucson: CAD-Surfacing, Pro/SURFACE, GD&T, ANSI Y14.5M, ASME standards; Per (45294257609) ============================================================================================== Position: CAD-Surfacing Reference: SMC01262 Location: Tucson AZ Duration: Perm Skills: 6 + years ProEngineering CAD tools especially Pro/SURFACE. Mechanical design principles, concepts practices and standards. GD&T in accordance with ANSI Y14.5M. Technical drafting, ASME drawing standards. Design and documen...

Is there someone who can help me to calculate and plot the power spectrum of a 2D field? I have already calculated the power spectral density (it's a 3D function) of the matrix through the FFt of the same matrix, you can use various techniques, for example using the periodogram, but now i need the power spectrum of the field so...? How can i do? (PS: for example in turbulence you give a 3D field and you can compute the power spectra, how? Therefore I am in the 2D input case) Is there someone who have already done any Mathematica routine? Thank you very much, Matteo. ...

Hi, Is there any way to plot a point, line, etc. with a specific handle value ? Thx in advance, -horatiu- Horatiu V. Corbeanu wrote: > > > Hi, > > Is there any way to plot a point, line, etc. with a specific handle > value ? > > Thx in advance, > -horatiu- > > > No there isn't. Whenever MATLAB creates a graphics object, it assigns a unique handle to the object. Why would you want to specify one? --- Tim Farajian tfarajia@mathworks.com Well, I asked the question earlier on the net and I didn't receive an answer, so I found some wor...

Are there any command to smooth the contour data I have x, y, and Z data where x is 1-by-20; y is 1-by-50; and z is 20-by-50. Thanks so much help interp2 "peter" <peter@xyz.com> wrote in message news:ef36efc.-1@webx.raydaftYaTP... > Are there any command to smooth the contour data > I have x, y, and Z data where x is 1-by-20; y is 1-by-50; and z is > 20-by-50. > > Thanks so much In article <ef36efc.-1@webx.raydaftYaTP>, peter <peter@xyz.com> wrote: > Are there any command to smooth the contour data > I have x, y, and Z data where x is 1-b...

I've managed to select a range of cells in my workbook and I want to paste an array into those cells. Select(Range(ActSheet,'A1:C100')); I then tried to use ActCell = get(Spreadsheet1,'ActiveCell'); set(ActCell,'Value',data); but it didn't work. I assumed the active cell property would cover the whole range selected, but it doesn't appear so. If I try ActRange = get(Spreadsheet1,'Range'); I recieve an error: ??? Invoke Error: Incorrect number of arguments Error in ==> torquecurveinput8>labelupdate at 264 ActRange ...

I have a matrix of four columns of data. The first one is time and the others are data. I want to plot the last three columns against the first one. How do I do this? plot(M(:, 1), M(:, 2:end)) Litvinov Sergey wrote: > > > plot(M(:, 1), M(:, 2:end)) > > Thank you very much. ...