当前位置:网站首页>Halcon principle: one dimensional function_ 1D type [1]
Halcon principle: one dimensional function_ 1D type [1]
2022-06-23 11:59:00 【Mr anhydrous】
We know , Tuples are one-dimensional , But it's not a function . One dimensional functions are special data generated by tuples , For functions , There is a special set of operators to operate .
One 、 How to generate
1.1 Generate by tuple function_1d function
- create_funct_1d_array: Create a discrete one-dimensional function from a one-dimensional array

- create_funct_1d_pairs: Create a discrete one-dimensional function through a double one-dimensional array

Be careful : Argument tuple XValue Must be sorted ( From small to large ).
1.2 1d Inverse operation on function
1)funct_1d_to_pairs Get one-dimensional discrete function x and y Value corresponding tuple
funct_1d_to_pairs( flow, XValues1, YValues1)
From the input function flow Get two tuples :XValues1, YValues1

2)get_y_value_funct_1d Get one-dimensional discrete function y value ( No more details )
Two 、1d One dimensional operations on functions
1)abs_funct_1d Calculate the absolute value of a one-dimensional function
Prototype :abs_funct_1d( : : Function : FunctionAbsolute)

2)compose_funct_1 Compound two discrete one-dimensional functions into one function
This is a composite function , such as : 
3、 ... and 、 Comprehensive sample code
Understand the above operations , You can understand the following code :
* This example program shows how to use compose_funct_1d. It computes
* two functions, atan(x) and cos(x), and composes them, which results in the
* function cos(atan(x)). This function is, of course, identical to 1/sqrt(1+x*x),
* so this function is also calculated. The program displays all four functions.
* By comparing the last two plots, we can check whether compose_funct_1d
* works correctly.
dev_update_off ()
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'white', WindowHandle)
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_set_color ('black')
dev_set_line_width (2)
X := []
for J := -125 to 125 by 1
X := [X,J / 40.0]
endfor
stop()
create_funct_1d_pairs (X, cos(X), Cos)
X := []
for J := -100 to 100 by 1
X := [X,J / 10.0]
endfor
stop()
create_funct_1d_pairs (X, atan(X), ATan)
create_funct_1d_pairs (X, 1 / sqrt(1 + X * X), InvSqrt1pSqX)
compose_funct_1d (ATan, Cos, 'constant', CosATan)
plot_funct_1d (WindowHandle, ATan, 'x', 'atan(x)', 'red', ['axes_color','origin_x','origin_y'], ['black',0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, Cos, 'x', 'cos(x)', 'red', ['axes_color','origin_x','origin_y'], ['black',0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, CosATan, 'x', 'cos(atan(x))', 'red', ['axes_color','origin_x','origin_y','start_y'], ['black',0,0,0])
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
dev_clear_window ()
plot_funct_1d (WindowHandle, InvSqrt1pSqX, 'x', '1/sqrt(1+x*x)', 'red', ['axes_color','origin_x','origin_y','start_y'], ['black',0,0,0])
* ( To be continued )
边栏推荐
- 汉源高科新一代绿色节能以太网接入工业交换机高效节能型千兆工业以太网交换机
- Redis 入门-第二篇-数据结构与对象-链表
- 请问连接oracle时,这个version 1.54 是什么的version?
- The list of open source summer winners has been publicized, and the field of basic software has become a hot application this year
- Linked list 5 - 234 Palindrome linked list
- [comprehensive written test questions] 30 Concatenate substrings of all words
- Mysql, how to calculate the maximum value using stored procedures
- How does easygbs solve the abnormal use of intercom function?
- 广播级E1转AES-EBU音频编解码器 E1转立体声音频卡侬头(XLR)编解码器
- Surprise! Amd acquires Xilinx with USD 35billion!
猜你喜欢

二维激光SLAM( 使用Laser Scan Matcher )

Introduction to redis - Chapter 3 - data structures and objects - Dictionary

go-zero微服务实战系列(六、缓存一致性保证)

汉源高科8路电话+1路百兆以太网RJ11电话光端机 8路PCM电话光端机

2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案

Introduction to redis - Chapter 1 - data structures and objects - simple dynamic string (SDS)

汉源高科新一代绿色节能以太网接入工业交换机高效节能型千兆工业以太网交换机

电脑坏了,换了台电脑,装node环境的时候出了问题,报错URL not defined

凭借32量子比特!Rigetti Computing打入英国量子计算市场
[email protected] HDMI2.0光端机 HDMI高清视频光端机"/>4K-HDMI光端机1路[email protected] HDMI2.0光端机 HDMI高清视频光端机
随机推荐
Qt知识:视图框架QGraphicsWidget详解
2022施工员-设备方向-岗位技能(施工员)考题模拟考试平台操作
Leetcode 1209. 删除字符串中的所有相邻重复项 II(牛逼,终于过了)
Slam Laser 2D (en utilisant Laser Scan matcher)
DuPont analysis: what is the investment value of Anyang Iron and Steel Co., Ltd?
【进程和线程】
2022施工员-装饰方向-岗位技能(施工员)操作证考试题库模拟考试平台操作
One picture decoding opencloudos community open day
Go 语言使用 MySQL 的常见故障分析和应对方法
PPT制作3D旋转动画从入门到进阶
请问,maxcompute执行sql查询有时特别慢是什么原因
How does easygbs solve the abnormal use of intercom function?
爱可可AI前沿推介(6.23)
mysql,如何在使用存储过程计算最大值
Learning notes sweep crawler framework
Common fault analysis and Countermeasures of MySQL in go language
公开课丨玩的就是短视频!今晚教你精准变现!
2光2电级联型光纤收发器千兆2光2电光纤收发器迷你嵌入式工业矿用本安型光纤收发器
2022工具钳工(初级)考试练习题模拟考试平台操作
理财产品的赎回时间有规定吗?