Matlab 2013a and Excel

1 回表示 (過去 30 日間)
Marcos Tawadros
Marcos Tawadros 2015 年 4 月 2 日
コメント済み: Marcos Tawadros 2015 年 4 月 28 日
I am using Matlab 2013 a and I have an excel sheet that has 2D numerical values. For e.g:
-3 -2 -1 0 1 2 3
0 2.1 5 4 2.5 3 8 9
-1 11 12 13 9 4 2 1
and so on, I would like to know how I can get a certain cell value such as '13' as an e.g. from the values (-1,-1), what function i can use and how. thanks in advance.
  5 件のコメント
per isakson
per isakson 2015 年 4 月 3 日
Never write "not working" without telling in what way and providing an error message.
data seems to be a row vector. What does
whos data
show?
Marcos Tawadros
Marcos Tawadros 2015 年 4 月 28 日
how can I plot these data plot(z,x,Bt) ????

サインインしてコメントする。

回答 (2 件)

per isakson
per isakson 2015 年 4 月 2 日
Assumption:
  • the values in the top row are unique integers
  • the values in the leftest column are unique integers
Hint:
data = [ 2.1 5 4 2.5 3 8 9
11 12 13 9 4 2 1 ];
row_points = [ 0; -1 ];
col_points = [ -3 -2 -1 0 1 2 3 ];
data( row_points==-1, col_points==-1 )
returns
ans =
13
  8 件のコメント
Marcos Tawadros
Marcos Tawadros 2015 年 4 月 3 日
I know the output is gonna be a scalar integer 1*1.
Marcos Tawadros
Marcos Tawadros 2015 年 4 月 28 日
how can I plot(data(row_points,column_points) with row_points and column_points?

サインインしてコメントする。


LUI PAUL
LUI PAUL 2015 年 4 月 3 日
if this is your excel data(say)
-3 -2 -1 0 1 2 3
0 2.1 5 4 2.5 3 8
-1 11 12 13 9 4 2
num = xlsread('cloudy.xlsx');
value=num(2,2); %for value Of B2 in excel
the value will be 2.1
  2 件のコメント
Marcos Tawadros
Marcos Tawadros 2015 年 4 月 3 日
Subscripting into an mxArray is not supported.
LUI PAUL
LUI PAUL 2015 年 4 月 5 日
please clarify your comment

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by