Loading a generated array into a visible table in AppDesigner
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
Hi everyone,
I am creating an application that can be used to display imported data into a table, plot the same data into histograms, scatter plots and general plots.
I have two issues that I would like help on.
How do I pass the results obtained from one function to the next function. for example, how do I get my imported data to plot without repeating the whole code?
Secondly, how can I display my already imported data in form of a table in AppDesigner as it is
採用された回答
"How do I pass the results obtained from one function to the next function. for example, how do I get my imported data to plot without repeating the whole code? "
There are several ways to do this. Assuming the import function is defined within your appdesigner file, the cleanest method would be to merely pass the data into the plotting function as an additional input. Alternatively, you could store the data in the "UserData" property of the axis handle and then retreive it from within your plotting function.
app.UIAxes.UserData = myData; %store the data
myData = app.UIAxes.UserData; %retrieve the data from within the plotting function
Secondly, how can I display my already imported data in form of a table in AppDesigner as it is
Here's instructions how to set up the table when the app first starts
And here are some demos showing how to update the table once there is new data
10 件のコメント
The second part returns the following error
%No appropriate method, property, or field 'UITablle' for class 'Estimator'.
I'd need to see the relevant section of code that is generating the error. Perhaps a typo (you have two L's in UITable)? Also, perhaps you're trying to access the wrong object. What's the Estimator class object?
Estimator is the Classdef:
I have loaded and generated a table already. I would like to display using the user interface at on the appDesigner. Please have a look below
M2002=table2array(M2002(:,2:20));
x=M2002;
app.Load_DataButton.UserData = x;
% Cell edit callback: UITable
function UITableCellEdit2(app, event)
x = app.Load_DataButton.UserData;
app.UITablle.Data={x}
%yields the error below
%Error setting property 'Data' of class 'Table':Data within a cell array must have size [1 1]
Error setting property 'Data' of class 'Table':
Data within a cell array must have size [1 1]
Could you share a sample of {x} if it's too large to copy-paste the entire array? My guess is that one of the cells in the array contains more than 1 element. There must be one element per cell in the table.
If your data are a matrix (numeric), then you shouldn't be putting it into a cell array.
Lui
2019 年 5 月 8 日
Attached id the file
Thanks. What happens when you input the matrix (instead of converting it to a cell array)?
app.UITablle.Data= x; % not {x}
Lui
2019 年 5 月 8 日
Thank you so much Adam for walking through this with me. I feel like calling you. It works.
haha no problem. Glad I could help.
Lui
2019 年 5 月 12 日
hi Adam
Could you please take a look at this? It is part of the problem I am trying to sort
I will appreciate your feedback on this set of problem
Adam Danz
2019 年 5 月 13 日
I replied there.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Noncentral t Distribution についてさらに検索
参考
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
