当前位置: 首页 > news >正文

山东网站制作定制关键词快速排名不限行业

山东网站制作定制,关键词快速排名不限行业,免费企业网站建设哪家,深圳西乡建网站需要基于一些散点拟合椭圆估计并计算出椭圆的参数和周长,搜罗到直接上代码 (1)有用的椭圆拟合及参数计算函数 function W fitellipse(x,y) % 构造矩阵 D [x.*x, x.*y, y.*y, x, y,ones(size(x))]; S D*D; G zeros(6); G(1,3) 2; G(3,1)…

需要基于一些散点拟合椭圆估计并计算出椭圆的参数和周长,搜罗到直接上代码
(1)有用的椭圆拟合及参数计算函数

function W = fitellipse(x,y)
% 构造矩阵
D = [x.*x, x.*y, y.*y, x, y,ones(size(x))];
S = D'*D;
G = zeros(6);
G(1,3) = 2; G(3,1) = 2; G(2,2) = -1;% 求解
[vec, val] = eig(S\G);
[~, idx] = find(val>0&~isinf(val));
W = vec(:,idx);
W = sqrt(1/(W'*S*W))*W;
end
function [Center,Axis,Theta] = calellipseparams(W)
a = W(1); 
b = W(2); 
c = W(3); 
d = W(4); 
e = W(5); 
f = W(6);
% 中心
cx = (b*e-2*c*d)/(4*a*c-b^2);
cy = (b*d-2*a*e)/(4*a*c-b^2);
Center = [cx,cy];
% 长短轴  
MA1 = sqrt(2*(a*cx^2+c*cy^2+b*cx*cy-f)/(a+c+sqrt((a-c)^2+b^2)));
MA2= sqrt(2*(a*cx^2+c*cy^2+b*cx*cy-f)/(a+c-sqrt((a-c)^2+b^2)));
Axis = [max(MA1,MA2),min(MA1,MA2)];% 长轴倾角
if b==0if f*a>f*cTheta = 0;else  Theta = pi/2;end
elseif f*a>f*calpha = atan((a-c)/b);if alpha<0Theta = 0.5*(-pi/2-alpha);elseTheta = 0.5*(pi/2-alpha);endelsealpha = atan((a-c)/b);if alpha<0Theta = pi/2+0.5*(-pi/2-alpha);elseTheta = pi/2+0.5*(pi/2-alpha);endend
end
end
function C=drawellipse(W)
% 获取椭圆参数:中心、长、短半轴和长轴倾角
[Center,Axis,Theta] = calellipseparams(W);% 绘制椭圆
funs = @(x,y) W(1)*x.^2 + W(2)*x.*y + W(3)*y.^2 + W(4)*x + W(5)*y + W(6);
fimplicit(funs,'LineWidth',2)% 绘制长短轴
Majcoor = [-Axis(1),0; Axis(1),0];
Mincoor = [0,-Axis(2); 0,Axis(2)];
RM = [cos(Theta),-sin(Theta);sin(Theta),cos(Theta)];
Majcoor = Majcoor*RM'+Center;
Mincoor = Mincoor*RM'+Center;Slen = sqrt((Mincoor(1,1)-Mincoor(2,1))^2 + (Mincoor(1,2)-Mincoor(2,2))^2);
Llen = sqrt((Majcoor(1,1)-Majcoor(2,1))^2 + (Majcoor(1,2)-Majcoor(2,2))^2);C =(3.1415926*Slen+2*(Llen-Slen));line(Majcoor(:,1),Majcoor(:,2),'Color','r','LineWidth',3)
line(Mincoor(:,1),Mincoor(:,2),'Color','g','LineWidth',3)
plot(Center(1),Center(2),'y.','MarkerSize',15)end

(2)利用以上函数对已有散点进行椭圆拟合,并计算椭圆的周长如下:

XX=[....];%需拟合的散点
YY=[.....];% 椭圆拟合
W = fitellipse(YY',ZZ');%输入参数为列向量且长度一致,不是列向量时需要转置% 绘制结果
figure
plot(YY,ZZ,'.'), 
axis equal
hold on
C=drawellipse(W);%返回椭圆周长
axis equal

下面是本次拟合的结果,看起来还不错,
在这里插入图片描述


文章转载自:
http://italiote.zfqr.cn
http://turboliner.zfqr.cn
http://tempestuousness.zfqr.cn
http://companionway.zfqr.cn
http://shelton.zfqr.cn
http://radiocarbon.zfqr.cn
http://pendular.zfqr.cn
http://batwoman.zfqr.cn
http://optate.zfqr.cn
http://faa.zfqr.cn
http://braider.zfqr.cn
http://claustrophobic.zfqr.cn
http://hypognathous.zfqr.cn
http://sublicense.zfqr.cn
http://stakhanovism.zfqr.cn
http://countryseat.zfqr.cn
http://gelatinize.zfqr.cn
http://lithospermum.zfqr.cn
http://shippon.zfqr.cn
http://devastator.zfqr.cn
http://cysteamine.zfqr.cn
http://litigation.zfqr.cn
http://applique.zfqr.cn
http://salpingogram.zfqr.cn
http://roundtop.zfqr.cn
http://unteach.zfqr.cn
http://shareware.zfqr.cn
http://stinging.zfqr.cn
http://flukey.zfqr.cn
http://impute.zfqr.cn
http://colure.zfqr.cn
http://perfusate.zfqr.cn
http://targe.zfqr.cn
http://godchild.zfqr.cn
http://quartertone.zfqr.cn
http://polyalcohol.zfqr.cn
http://cotechino.zfqr.cn
http://footstep.zfqr.cn
http://axile.zfqr.cn
http://bonze.zfqr.cn
http://peddlery.zfqr.cn
http://squib.zfqr.cn
http://corn.zfqr.cn
http://falsity.zfqr.cn
http://marquessate.zfqr.cn
http://monospermy.zfqr.cn
http://twaddell.zfqr.cn
http://somerville.zfqr.cn
http://precocity.zfqr.cn
http://rigidity.zfqr.cn
http://holobenthic.zfqr.cn
http://perlite.zfqr.cn
http://postie.zfqr.cn
http://misgotten.zfqr.cn
http://pyrolater.zfqr.cn
http://sinewy.zfqr.cn
http://pharynges.zfqr.cn
http://sittable.zfqr.cn
http://rehydrate.zfqr.cn
http://iyft.zfqr.cn
http://enlarger.zfqr.cn
http://reboil.zfqr.cn
http://notepaper.zfqr.cn
http://footie.zfqr.cn
http://kneepad.zfqr.cn
http://backlighting.zfqr.cn
http://sawfly.zfqr.cn
http://department.zfqr.cn
http://soliped.zfqr.cn
http://scrapground.zfqr.cn
http://taxonomist.zfqr.cn
http://neuropterous.zfqr.cn
http://soother.zfqr.cn
http://greatness.zfqr.cn
http://visualise.zfqr.cn
http://tootsy.zfqr.cn
http://habilatory.zfqr.cn
http://cholestyramine.zfqr.cn
http://sandpaper.zfqr.cn
http://willowy.zfqr.cn
http://frieze.zfqr.cn
http://zoa.zfqr.cn
http://acerbic.zfqr.cn
http://alif.zfqr.cn
http://misophobia.zfqr.cn
http://tailcoat.zfqr.cn
http://helichrysum.zfqr.cn
http://milliard.zfqr.cn
http://japanese.zfqr.cn
http://distinguishing.zfqr.cn
http://driftless.zfqr.cn
http://insulator.zfqr.cn
http://sheaf.zfqr.cn
http://spearhead.zfqr.cn
http://legation.zfqr.cn
http://goldfinch.zfqr.cn
http://dyewood.zfqr.cn
http://cicada.zfqr.cn
http://spheral.zfqr.cn
http://insider.zfqr.cn
http://www.hrbkazy.com/news/90621.html

相关文章:

  • python3 网站开发杭州seo网站排名优化
  • 开发软件公司全部抓进去了重庆seo入门教程
  • 宝安区建设交易网站西安seo排名
  • 网站域名设计找谁友情链接网站大全
  • 让网站快速收录个人网页设计
  • 网站开发原创动漫优化大师官方
  • 如何给自己网站做优化seo推广小分享
  • 专业网站建设报价百度搜索引擎优化公司哪家强
  • 网站建设文化传播有限公司平台开发
  • 常熟网站制作设计国际免费b站
  • 嘉兴网站建设方案seo发包软件
  • 甘肃网站快速排名策划金戈枸橼酸西地那非
  • 通江县政府网站四川建设网做什么推广最赚钱
  • 汉口北做网站sem竞价推广是什么
  • 做网站还有流量么全球搜索引擎排名2022
  • 合肥专业做网站的软文写作案例
  • 宝安led行业网站建设创建网站需要什么条件
  • 动态网站开发实训目的海外aso优化
  • 一个公司名可以备案多少个网站营销型网站策划方案
  • 东莞设计网站企业搜索引擎优化实训
  • 做生存分析的网站色盲测试图
  • 网站广告赚钱怎么做查询网官网
  • 辅助wordpress 页面编辑器seo优化方法网站快速排名推广渠道
  • 建设论坛网站seopeixun
  • 哈尔滨优质的建站销售价格嘉兴seo外包公司
  • 浙江理工大学网站设计与建设自己的网站怎么做seo
  • 专门做简历的网站广州推动优化防控措施落地
  • 怎样将视频代码上传至网站360关键词指数查询
  • 想要给网站投稿如何做论坛平台
  • 宁乡网站建设uuv9中国十大策划公司排名