Matlab合适的数据选择 [英] Matlab uitable data selection

查看:213
本文介绍了Matlab合适的数据选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有从AScii文件读取的数据的Uitable.

I have Uitable with data read from a AScii file.

  1. 我想使用鼠标以及复选框来选择列.我尝试了很多,但我不知道如何使用鼠标选择可获取的列并获取该数据.

  1. I want to select columns using mouse and also using checkboxes. I tried a lot but i cannot figure out how to select uitable column using mouse and getting that data.

我还要尝试在uitable的最后一行插入复选框,因此当用户选择复选框时,会选择特定的列.

Also I am trying to insert checkbox in the last row of the uitable, so when user selects checkbox, particular column is selected.

有什么主意吗?

推荐答案

您应编辑表的CellSelectionCallbackCellEditCallback属性.

You should edit the CellSelectionCallback and the CellEditCallback properties of your table.

   set(myTable,`CellSelectionCallback`,@CallBack)

为了查看选择了哪些列/行,请使用在回调中收到的事件数据.

In order to see what columns/rows were selected, use the event data that you receive in your callback.

  function CallBack(hObj,evt)   
      disp(evt);
  end

据我所知,当不触发回调时,无法发现当前选择的列.

As far as I know, there is no way to discover what columns are currently selected when the callback is not fired.

这篇关于Matlab合适的数据选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆