Undefined operator / for input arguements of type cell.
古いコメントを表示
I realize this question may have been asked a billion times, but I can't for the life of me see why its popping up with my code. I'm calculating the maximum value in a data set 'bridge1Load' through this loop:
maxLoad1 = 0;
for n = 1:length(bridge1Load)
for k = 1
if bridge1Load(n, k) > maxLoad1
maxLoad1 = bridge1Load(n, k);
end
end
end
and my bridge weight is a user input from:
bridge1WeightInput = inputdlg('Please enter the weight of bridge #1','Bridge #1 Weight');
I'm trying to calculate the strength to weight ratio via:
s2wRatio1 = maxLoad1 / bridge1Weight;
but I keep getting the error stated above.
2 件のコメント
Anas Abou Allaban
2015 年 10 月 11 日
dpb
2015 年 10 月 11 日
bridge1Load must be a cell array, not a double, then. A likely candidate to have caused that would be reading the data from a file via textscan.
The best solution relies somewhat on just what the form of the data are; how was it actually loaded/obtained and specifically, what does
whos bridge1Load
return?
Then we can look at "more better" ways to do the above as well...
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!