Preprocessing data before analysis. How can I split my data, set a function and obtain a new matrix with new values?

Hi dears,
I'm studying the energy embedded in the world economy. I have the Input-Output tables that show the economic value of the transactions between the sectors of the world's economies. The tables are like this:
I must reassamble the data.
For example I want a table that show me only the trades between the nation without the sectors.
How can I do something like this?
I try with the function sum and the function splitapply but doesn't work like i want. I think there is a simplier method.
Maybe this is an easy question but I'm learning to use MatLab recently.
Thx

1 个评论

The image is to small to be readable. In addition it does not tell anything useful about the structure of the data, as they are represented in Matlab. Post the corresponding code instead.

请先登录,再进行评论。

回答(1 个)

I have to split my databased based on index of elements.
Z = 4761X4761 matrix
I need to merge some rows and columns.
I put [i,j] = size(Z)
for i = 1:3
A = sum(Z(i,:),1)
end
But it returns only the sum of the third row

类别

帮助中心File Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by