亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

程序如下:這里為什么rows能對col操作?

程序如下:這里為什么rows能對col操作?

牧羊人nacy 2022-10-19 19:15:40
 [values rows]=max([2 7 42;9 14 8;10 12 45])values =10 14 45rows =3 2 3>> [value col]=max(values)value =45col =3>> row=rows(col)row =3
查看完整描述

2 回答

?
不負相思意

TA貢獻1777條經驗 獲得超10個贊

Matlab中rows()函數的作用:
返回引用或數組的行數。

語法使用:ROWS(array);
參數:Array 是需要得到其行數的數組、數組公式或對單。

元格區域的引用:
實例:
公式“=ROWS(A1:A9)”返回9,=ROWS({1,2,3; 4,5,6;1,2,3})返回3。

查看完整回答
反對 回復 2022-10-24
?
一只名叫tom的貓

TA貢獻1906條經驗 獲得超3個贊

這里的rows是一個方法,你可以調用,不是咱們平常的行的意思!你可以看看help rows:
function nrows = rows(cursor)
%ROWS Get number of rows in fetched data set.
% NROWS = ROWS(CURSOR) returns the number of rows
% retrieved by a database fetch operation. CURSOR is
% a cursor structure in which all elements have values.
%
% Example:
%
% nrows = rows(cursor)
%
% upon execution of the function nrows contains the
% the number of rows returned by the fetch.
%
% cursor=exec(conn,'select * from employees');
% cursor=fetch(cursor);
% nrows=rows(cursor)
%
% nrows = 9
%
% indicating there are 9 rows returned by FETCH.
%
% See also FETCH.

% Author: E.F. McGoldrick, 09-02-97
% Copyright 1984-2003 The MathWorks, Inc.
% $Revision: 1.14.4.2 $ $Date: 2004/04/06 01:05:11 $%

if isempty(cursor.Cursor)

nrows = -1;
return;

end

if ~isempty(cursor.Fetch)

nrows = double(rowsFetched(cursor.Fetch));

else

nrows = -1;

end;


查看完整回答
反對 回復 2022-10-24
  • 2 回答
  • 0 關注
  • 162 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號