is it possible in matlab, to make arrays of a cell matrix, linkable to a special path?(linkable:with clicking on that arrays an special figurue to be shown)

5 次查看(过去 30 天)
is it possible in matlab, to make arrays of a cell matrix, linkable to a special path?(linkable:with clicking on that arrays an special figurue to be shown)
  2 个评论
mohammad
mohammad 2011-9-15
sorry for late, i see your comment now. by clicking on a array for example {2,3} i want to plot two EXCEL files that their names are located in {1,3} and {2,1} and also these .xls files are located in a path that I know it

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2011-9-15
When you say "clicking on that array", what do you mean? When the array is displayed in the variable inspector? Or when it is being displayed in a GUI you constructed? In a uitable perhaps?
  2 个评论
Walter Roberson
Walter Roberson 2011-9-15
If you are referring to outputting hyperlinks in the command window, please see http://blogs.mathworks.com/desktop/2007/07/09/printing-hyperlinks-to-the-command-window/

请先登录,再进行评论。

更多回答(2 个)

mohammad
mohammad 2011-9-15
for example Find is a common cell like this:
Find =
'Refrences\Inputs ' 'a.xls' 's.xls'
'R1.xls' ' M' ' N'
'R2.xls' ' N' ' N'
'3.xls' ' N' ' M'
'4.xls' ' N' ' N'
'R5.xls' ' N' ' N'
'6.xls' ' N' ' M'
'7.xls' ' N' ' N'
'R8.xls' ' N ' L'
'9.xls' ' M' ' N'
'10.xls' ' L' ' N'
'11.xls' ' N' ' N'
now while clicking on Find {i,j} (i>1 ,j>1) to go a defined path
  12 个评论

请先登录,再进行评论。


mohammad
mohammad 2011-9-16
some other explanations and codes: there are 3 m-files, one is common(method.m) and 2 others are functions(operation.m and operationR.m). also there are two folders in names of 'inputs' and 'references'. by running method.m, first it looks at 'inputs' folder and gets how many .xls files to be exist. for example there are 2 .xls files with names of 'a.xls' and 's.xls'. then here (in method.m) we have a for-loop from i=1:2 (2=numel(dir('*.xls')). code of method.m is:
cd([z2, '\inputs'])%z2 is a directory name for example f:
d = dir('*.xls');
for o = 1:numel(d)
if o==1 % here 'Find2' cell is defined that its only for one time
cd([z2, '\refrences'])
b = dir('*.xls');
Find2=cell(numel(b)+1,numel(d)+1);
else
Find2= Find;
end
end
cd([z2, '\inputs'])
r = xlsread(d(o).name,2);
dfile=d(o).name;
InputNames{o}=sprintf(d(o).name,o); %here it's creating first row of 'Find' with names of .xls files that are existing in 'inputs' folder
[Find,ReferenceNames]=operation(r,dfile,o,InputNames,Find2) % here operation.m function is called to do some thing and computing on 'r' matrix (r =xlsread(d(o).name,2)) and this function is in the first for-loop (o=1:numel(d)).
Find{1,1} = 'Refrences\Inputs';
Find(2:end,1) = ReferenceNames;
Find(1,2:end) = InputNames;
Find % here 'Find' displays in command window
operation.m function:
%here first peaks of 'r' is found( that i dont show these commands) then it is going to define matrix for references .xls files to do same analyzing on (finding peaks of) references .xls files in other m-function in name of operationR.m
some command for finding peaks of 'r' and these peaks are in 'peaks' matrix
peaks;
cd([z2, '\refrences'])
b = dir('*.xls');
for u = 1:numel(b) %second loop
R_H_1 = xlsread(b(u).name,2);
if u==1 && 0==1 %here 'Find2' is defined for only one time
Result=cell(numel(b)+1,numel(d)+1);
end
cd(z2);
[R_peaks]=operationR(R_H_1,peaks); % here peaks of refrences are founded
ReferenceNames{u}=sprintf(b(u).name,u); %here first column of 'Find' is creating
if R_peaks==peaks
Find2{u+1,o+1}='M'
else
Find2{u+1,o+1}=' N';
end
end
Find=Find2;
  6 个评论
Walter Roberson
Walter Roberson 2011-9-17
Don't put in 3 or more commands: write a function that takes two arguments and does the plotting for you. The two arguments would be the two file names to use for that particular plot.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by