Increasing Dimensionality of data
Afficher commentaires plus anciens
Here is my question, I am not sure if that can be done at all.
I want to test relation between a property X to dimensionality of the matrix. Saying so, I would like to maintain the original properties of the data as close as possible. So, I thought of following two ways.
1. If I take IRIS data, it has four attributes what i would like to do is to increase the attribute to may be 6 or 12 and so forth. but still have characteristics of original data. I am not sure how to do it.
2. Another thing that might work would be to generate data like 3 Gaussian normal data but with different dimension. Will the data be able to relate to one another? Since, they simply have different dimension.
my question is not how to add extra data in matlab, but how add data still preserving the properties( if that makes sense
I would appreciate any help.
Thank you for looking.
Réponse acceptée
Plus de réponses (1)
Paulo Silva
le 24 Fév 2011
Here's one example, you can adapt it to your needs
a=[1 2 3 4
5 6 7 8]'
b=[a [9 10 11 12]'] %b is a with one more column
c=[a;[9 10]] %c is a with one more line
In your case size(a)=[150 4] and you want to add 2 more lines, example:
a=randn(150,4); %Create an array 150 by 4 with random values
b=(1:150)'; %Create a vector with numbers from 1 to 150
c=2*b; %Create another vector with numbers from 2 to 300
d=[a b c]; %add two more columns to a, 5 column is b and 6 column is c
4 commentaires
Nirmal
le 24 Fév 2011
Paulo Silva
le 24 Fév 2011
I have no idea what you are doing and what you wish to add, I'm just giving you the ways to add more data and preserve that data that's already in the array.
Nirmal
le 24 Fév 2011
Paulo Silva
le 24 Fév 2011
Good question, maybe the experts can help you (I believe that some of them got magic balls but don't tell anyone).
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!