Using Matlab with Antelope

1 回表示 (過去 30 日間)
Neil Bhattacharjee
Neil Bhattacharjee 2016 年 6 月 29 日
コメント済み: Neil Bhattacharjee 2016 年 6 月 29 日
I'm currently using parameter files, and i'm running into a problem while attempting to extract a matrix from a parameter file.
I'm using
variable_1 = pfget_tbl(pf,'variable_in_pf_file')
The variable in the pf file is defined as such
variable_in_pf_life &Tbl{
50
75
}
My method works, except the output with I do
disp(variable_1)
is
lonlim =
[-180]
[-120]
instead of the desired
-180 -120
Is there any way to make this change?
  1 件のコメント
Neil Bhattacharjee
Neil Bhattacharjee 2016 年 6 月 29 日
basically I need to convert a cell array into a matrix
str2double doesn't work because of the brackets, I just get
NaN NaN

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

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 6 月 29 日
cell2mat(lonlim)
  1 件のコメント
Neil Bhattacharjee
Neil Bhattacharjee 2016 年 6 月 29 日
doesn't work, but I found an alternative.
lonlim_new=[lonlim_array{1},lonlim_array{2}];

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by