フィルターのクリア

division of two 200 by 1 matricies produces: Error using * Inner matrix dimensions must agree

2 ビュー (過去 30 日間)
I have two variables: GtCCO2Diffh and CO2emithc.
size(GtCCO2Diffh) returns [200 1] --> a 200 row x 1 col matrix
size(CO2emithc) returns [200 1] --> a 200 row x 1 col matrix
but when I go to divide (or multiply) the two variables, I get "Error using * Inner matrix dimensions must agree.
Note GtCCO2Diffh is calculated using the following steps:
CO2h = ncread('spatially_int_Historical.nc','A_co2');
GtCCO2h =CO2h*2.123;
GtCCO2Diffh = GtCCO2h - GtCCO2h(1)
While CO2emithc is calculated in the following manner:
CO2emith = ncread('spatially_int_Historical.nc','F_co2emit');
CO2emithe = CO2emith*((365*24*60*60)/1E12);
CO2emithc = cumsum(CO2emithe);
My goal is to divide the two matricies to produce a new matrix representing the fractional value of the remaining Atmospheric Carbon (GtCCO2Diffh) over the CO2 emissions emitted(CO2emithc)
Why might this be?
Thanks!

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 6 月 13 日
編集済み: Azzi Abdelmalek 2013 年 6 月 13 日
How did you divide?
out=A./B % instead of A/B
out=A.*B % instead of A*B

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by