Clear Filters
Clear Filters

how to fit this surface ?

6 views (last 30 days)
khushboo chhikara
khushboo chhikara on 30 Apr 2018
Answered: Ameer Hamza on 30 Apr 2018
I want to fit this surface using gaussian.
filename='14 - sampleMap.xlsx';
[num,raw,txt] = xlsread(filename);
txt=cell2mat(txt)
figure,plot(num,'DisplayName','num')
figure,mesh(num)

Answers (1)

Ameer Hamza
Ameer Hamza on 30 Apr 2018
You can use fit() function from Curve Fitting Toolbox. For Gaussian surface fitting use it as
fit([x, y], z, 'a*exp(-( ((x-b)/c)^2 + ((y-d)/e)^2 ) ) + f')
the character array specifies the general Gaussian function in 2D.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!