Prev: Segmentation violation in CMEX-file ("Matlab has encountered an internal problem and needs to close")
Next: Unexpected error in simulink
From: roya olyazadeh on 4 May 2010 03:38 I have 2 surfaces surface1=surface(X1,Y1,Z1) surface2= surface(X2,Y2,Z2) I want to compare this 2 surfaces I dont know can I use this : surface3 = surface2 - surface1 ???? Can I have differences in matrix format : deltaX deltaY and deltaz ??
From: Walter Roberson on 4 May 2010 04:40 roya olyazadeh wrote: > I have 2 surfaces surface1=surface(X1,Y1,Z1) > surface2= surface(X2,Y2,Z2) > > > I want to compare this 2 surfaces I dont know can I use this : > surface3 = surface2 - surface1 ???? > > Can I have differences in matrix format : deltaX deltaY and deltaz ?? X* and Y* are vectors, and Z* are 2D arrays of size (length(X), length(Y)) ?? I would probably try playing with something like cell2mat(bsxfun(@(J,K) [X1(J)-X2(J), Y1(K)-Y2(K), Z1(J,K)-Z2(J,K)], (1:length(X1)).', 1:length(Y1)), 'Uniform', 0)
From: Luigi Giaccari on 9 May 2010 01:47
"roya olyazadeh" <roya2543(a)gmail.com> wrote in message <hroiss$i8f$1(a)fred.mathworks.com>... > I have 2 surfaces > surface1=surface(X1,Y1,Z1) > surface2= surface(X2,Y2,Z2) > > > I want to compare this 2 surfaces I dont know can I use this : > surface3 = surface2 - surface1 ???? > > Can I have differences in matrix format : deltaX deltaY and deltaz ?? Compare is just too ambiguous, you need to better explain which kind of comparison you want to perform: minum distance, z distance etc... http://www.advancedmcode.org/ |