全息谱程序的理解!!!
请教一下各位前辈:关于全息谱程序的编写:编写三维全息谱程序!!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% three_dimension_holospectra_2006_RIDC_WFJ
% 输入:所有支承截面上的正弦项系数和余弦项系数形成的系数矩阵 r=; i=1,2,…… n.
% 画出三维全息谱(椭圆、初相点0、创成线、方向标识点*)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function =holo3D(r)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
const=pi/180;
sizer=size(r);len=sizer(1);maxr=max(abs(r));z=fix(2.*max(maxr));
for i=1:len
t=1:361;
x(i,:)=r(i,1).*sin((t-1).*const)+r(i,2).*cos((t-1).*const);
y(i,:)=r(i,3).*sin((t-1).*const)+r(i,4).*cos((t-1).*const);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(1)
hold on
for i=1:len
plot(x(i,:)+z.*i,y(i,:)+z.*i,'LineWidth',);
plot(x(i,1)+z.*i,y(i,1)+z.*i,'ro');
plot(x(i,37)+z.*i,y(i,37)+z.*i,'g*');
end
for t=1:36:361
for i=1:len
line_x(i)=x(i,t)+z.*i;
line_y(i)=y(i,t)+z.*i;
end
plot(line_x,line_y);
end
grid on;axis equal;set(gcf,'color',);box on;title('三维全息谱图');
axis();
hold off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
return
楼主这是什么意思?是程序存在问题?还是和大家分享代码? 程序有问题?我自己没有调试出来~ 旋转机械二维全息谱计算的实用例程,融合多点信息,提高诊断可靠性。
看看~~~~~~~~~~~~~~ @suffer这个程序是屈院士 机械故障诊断全息原理上的光盘程序~可是我一直没有调试出来~ osbertbovey 发表于 2015-11-11 11:16
@suffer这个程序是屈院士 机械故障诊断全息原理上的光盘程序~可是我一直没有调试出来~
问题在哪儿?有没有什么提示信息? @suffer你有调用程序吗?我读取数据调用总是出错~ osbertbovey 发表于 2015-11-11 11:21
@suffer你有调用程序吗?我读取数据调用总是出错~
是不是你的数据格式有问题屈院士的调用数据r可是可以参考下面的文章 犟牛 发表于 2015-11-11 15:56
是不是你的数据格式有问题屈院士的调用数据r可是可以参考下面的文章
谢谢你~程序调不通啊~文章我有看的! osbertbovey 发表于 2015-11-11 18:05
谢谢你~程序调不通啊~文章我有看的!
把你的调试数据发出来看看 支持下,顶一下。。。。 犟牛 发表于 2015-11-12 10:34
把你的调试数据发出来看看
已经调好了,谢谢大家~ 犟牛 发表于 2015-11-12 10:34
把你的调试数据发出来看看
已经调好了,谢谢大家~~~~~~~~~ osbertbovey 发表于 2015-11-12 15:15
已经调好了,谢谢大家~
建议分享一下调试经验,以方便后人,谢谢
页:
[1]