⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bal_d.m

📁 计量工具箱
💻 M
字号:
% PURPOSE: Demo of bal()
%          Proportional transversal balancing
%---------------------------------------------------
% USAGE: bal_d
%---------------------------------------------------

clc; clear all; close all;

% Unbalanced time series (read columnwise)

y=[120 20 55
   130 22 66 
   190 33 99
   170 35 110 ];

% Transversal constraints

z=[ 210
    208
    300
    310 ];

% Calling balancing function    

yb = bal(y,z);

% Check

initial_discrepancy = sum(y')' - z
final_discrepancy   = sum(yb')' - z

% Revision (as %)

p = 100 * ((yb - y) ./ y);

% Final results:

disp ('Initial estimate, final estimate, revision in % (stacked results)');
results=[vec(y) vec(yb) vec(p)]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -