Ouputting data from a function to an array
显示 更早的评论
Hi there,
I'm trying to output data from an sfit function to an array, so that I can use the surfnorm command. Basically I am receiving position data from Imaris, a 3-D visualization software and performing a surface fit. I am tasked with generating surface normals to the resulting surface (and I intend to use the surfnorm command). However, to create these normals, I need the xyz coordinates (in a particular range) from the resulting surface fit. How does one sequester the xyz coordinates for a surface fit (I'm using the thin plate spline interpolation)? Note--I already have turned the plotted function in the createfit function into a workspace variable called fitresult. However, whenever I open the variable in my command line, I receive the following answer.
Thin-plate spline interpolant:
fitresult(x,y) = thin-plate spline computed from p
where x is normalized by mean 3760 and std 185.2
and where y is normalized by mean 2812 and std 188.8
Coefficients:
p = coefficient structure
Thanks!
Cheers, Harsh
回答(1 个)
dpb
2014-6-16
0 个投票
... the xyz coordinates (in a particular range) from the resulting surface fit
You had to have the coordinates to do the fitting; use those. If you need to select a subset within the total, use logical addressing. Perhaps giving snippet of the fitting code to show variables and more specifically where you're stuck???
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!