how to right matlab code
显示 更早的评论
clear all; close all;
%%%%%%%ensemble_avg calculating form this method. ensemble_avg = o;
for i = 1:5
if i == 1;
load model_1_data.mat;
ensemble = model_1;
elseif i == 2;
load model_2_data.mat;
ensemble = model_2;
elseif i == 3;
load model_3_data.mat;
ensemble = model_3;
elseif i == 4;
load model_4_data.mat;
ensemble = model_4;
elseif i == 5;
load model_5_data.mat;
ensemble = model_5;
end
ensemble_avg = ensemble_avg + ensemble;
ensemble_avg = ensemble_avg/5;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
natural_variability = 0.4595;
m_r_b = 0;
m_r = 0;
m = 1 ; n = 1; % for this calculation taking m = 1 and n = 1
for i = 1:5
if i == 1;
load observation.mat;
load model_1_data.mat;
bias = model_1 - obs;
elseif i == 2;
load model_2_data.mat;
bias = model_2 - obs;
elseif i == 3;
load model_3_data.mat;
bias = model_3 - obs;
elseif i == 4;
load model_4_data.mat;
bias = model_4 - obs;
elseif i == 5;
load model_5_data.mat;
bias = model_5 - obs;
end
distance = bias - ensemble_avg;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
model_reli = (((natural_variability/abs(bias)).^m).*((natural_variability/abs(distance)).^n));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
m_r_b = m_e_e + (model_reli.*bias); % model reliability and model bias
m_r = m_e + model_reli;
weigh_avg_ens = m_e_e/m_e; % rea method (average change)
end
this is code for this attached file . this right or wrong and pls help me how will be repeat procedure for equation 3rd and 4th
3 个评论
Robert Alvarez
2015-3-12
Have you tried to write the code? Does your attempt work? Do that and insert it into your question and we can comment.
If you do not know how to start, I suggest you read tutorials or a book on Matlab. There are many of them,
Sara Hafeez
2015-3-12
They are basic summation and division equations with a power or exponent of n you can easily do them if you know basic maths
devendra
2015-3-12
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!