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일

0 개 추천

cell2mat(lonlim)

댓글 수: 1

doesn't work, but I found an alternative.
lonlim_new=[lonlim_array{1},lonlim_array{2}];

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2016년 6월 29일

댓글:

2016년 6월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by