自定义Matlab ginput 十字线颜色

 时间:2026-02-17 02:20:59

1、打开Matlab,在命令鬼施英行键入 edit ginput;

自定义Matlab ginput 十字线颜色

2、在 编辑器 标签下找到 保存 选项卡,点击下拉三角形,点击 另存为,保存到你所需的工作空间,为了不引起歧义,建议对文件名进行修改,这里改为zginput(这个无要求,任意都行)

自定义Matlab ginput 十字线颜色

自定义Matlab ginput 十字线颜色

自定义Matlab ginput 十字线颜色

3、将函数名称和文件名称对应起来,即函数名称和文件名称必须一致。这里将原来function [out1,out2,out3] = ginput(arg1) 改为 function [out1,out2,out3] = zginput(arg1)。修改完物泉后原来的波浪线会消失。

自定义Matlab ginput 十字线颜色

自定义Matlab ginput 十字线颜色

4、将光标定位到  crossHair 函数附近(大约267行,不同版本可能会有点差异)

自定义Matlab ginput 十字线颜色

5、将 crossHair 函数下 crossHair(k) =uicontrol(...) BackgroundColor 后面的 [0 0 0] 修改为篇往你所需的RGB颜色数值(值必须小于等于1)。例如,红色为 [1 0 0]。CTRL + S 保存。

自定义Matlab ginput 十字线颜色

自定义Matlab ginput 十字线颜色

6、调用该(这里为zginput)函数,具体用法和 ginput 同,修改后的样子如图示。

自定义Matlab ginput 十字线颜色

  • Mathematica基础——简单的图片处理①
  • 如何在matlab中使用多维数组?
  • matlab 数据类型小谈
  • matlab怎么读写excel数据文件
  • matlab find用法
  • 热门搜索
    红豆汤的功效与作用 butterfly什么意思 牛筋草的功效与作用 音响什么牌子好 盐蒸橙子的功效与作用 fob什么意思 嘿咻什么意思 知识竞答 蜂王浆的功效与作用及食用方法 物理知识