Sir,
I am still new to the R-matlab interfacing. I will explain you the problem
statement more clearly.
The following is a matlab code. (swissroll.m)
=========================================================
% SWISS ROLL DATASET
N=2000;
K=12;
d=2;
clf; colordef none; colormap jet; set(gcf,'Position',[200,400,620,200]);
% PLOT TRUE MANIFOLD
tt0 = (3*pi/2)*(1+2*[0:0.02:1]); hh = [0:0.125:1]*30;
xx = (tt0.*cos(tt0))'*ones(size(hh));
yy = ones(size(tt0))'*hh;
zz = (tt0.*sin(tt0))'*ones(size(hh));
cc = tt0'*ones(size(hh));
subplot(1,3,1); cla;
surf(xx,yy,zz,cc);
view([12 20]); grid off; axis off; hold on;
lnx=-5*[3,3,3;3,-4,3]; lny=[0,0,0;32,0,0]; lnz=-5*[3,3,3;3,3,-3];
lnh=line(lnx,lny,lnz);
set(lnh,'Color',[1,1,1],'LineWidth',2,'LineStyle','-','Clipping','off');
axis([-15,20,0,32,-15,15]);
% GENERATE SAMPLED DATA
tt = (3*pi/2)*(1+2*rand(1,N)); height = 21*rand(1,N);
X = [tt.*cos(tt); height; tt.*sin(tt)];
% SCATTERPLOT OF SAMPLED DATA
subplot(1,3,2); cla;
scatter3(X(1,:),X(2,:),X(3,:),12,tt,'+');
view([12 20]); grid off; axis off; hold on;
lnh=line(lnx,lny,lnz);
set(lnh,'Color',[1,1,1],'LineWidth',2,'LineStyle','-','Clipping','off');
axis([-15,20,0,32,-15,15]); drawnow;
% RUN LLE ALGORITHM
Y=lle(X,K,d);
% SCATTERPLOT OF EMBEDDING
subplot(1,3,3); cla;
scatter(Y(1,:),Y(2,:),12,tt,'+');
grid off;
set(gca,'XTick',[]); set(gca,'YTick',[]);
===========================================================
I must write a program in R, which will call this swissroll.m file. The output
(of swissroll.m) must be shown in R interface and not in matlab . Is it
possible? How can i do it? Kindly bear with me as i am not very comfortable
with R. Though i have read your help(Matlab) and the examples, i did not find
any clear documentation regarding calling an external file in R. Please help me
on this.
regards,
Bhanu Kalyan K
Bhanu Kalyan K
BTech CSE Final Year
[EMAIL PROTECTED]
Tel :+91-9885238228
__________________________________________________
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.