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)

1 view (last 30 days)
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 Comments
mohammad
mohammad on 15 Sep 2011
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

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 15 Sep 2011
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 Comments
Walter Roberson
Walter Roberson on 15 Sep 2011
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/

Sign in to comment.

More Answers (2)

mohammad
mohammad on 15 Sep 2011
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 Comments

Sign in to comment.


mohammad
mohammad on 16 Sep 2011
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 Comments
Walter Roberson
Walter Roberson on 17 Sep 2011
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.

Sign in to comment.

Categories

Find more on Entering Commands in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!