Using strings arrays to label an array of changing size
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi guys ^^,
recently I've been using a user defined function by Joao Henriques called disptable and I've come across a problem I thought someone more experienced could help me with.
This program:
Creates a means through which to label any matrix using string arrays or just separators |
I want to label a matrix that varies in size (changes the number of columns) depending on initial values. i.e the following matrix:
[1 2 3 4 5 6] Becomes [1 2 3 4] as initial conditions state the last two elements are no longer needed.
Is there a way to use the aforementioned program in such a way that a string array:
'Dip 1' 'Dip 2' 'Dip 3' 'Dip 4' Becomes Dip 1 Dip 2 Dip 3
if necessary?
I know this is more for aesthetic purposes and I could just simply make a label 'No. of Dip' and place it on top of a column array 1 2 3 4 etc... but is it possible to do this using the above function?
I tried this way
>>disptable(exmplematrix,'S','A|B|C|D')
Where S is a string matrix defined like so:
S={'D1' 'D2 'D3' 'D4'} S= 'D1' 'D2' 'D3' 'D4'
But whenever I try it says:
??? Undefined function or method 'iscellarray' for input arguments of type 'cell'.
Has that specific matlab command been changed/updated since this program was made?
Again, thanks for the help in advance ^^,
0 commentaires
Réponse acceptée
Image Analyst
le 11 Fév 2012
I think that iscellarray is either a function that he didn't include, or it was a MATLAB function that was deprecated (made obsolete and slated for removal in some unspecified future version), or else it's in a Toolbox that you don't have.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Axis Labels dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!