I LOVE YOU

Posted on at


 

I LOVE YOU - IN MATLAB'S WAY

Hello friends i am going to share a unique way of saying i love you to the special person you like but can gather the courage to tell her about your feelings. It would be an advantage if both the persons have a knowledge of Matlab. This code can be sent to her or him just for asking to check it for errors and when it would be executed your feelings would be expressed in an unusual way. This might give an edge over the traditional way of proposing.

The code is simple one, using a data file in excel file that is read by the xlsread command.  Other commands used are getframe, axes, plot, for loop and linspace.

Matlab Code:

data=xlsread('heart.xlsx');
x=data(:,1);
y=data(:,2);
for i=1:length(x);
hold on
plot(x(i),y(i),'.r','MarkerSize',20)
F(i)=getframe;
end
%% Now lets make it look even more better by turning off the axis
set(gca,'handlevisibility','off', 'visible','off')
%% you must add a rose to add more grace to the proposal
a=imread('aa.jpg');
h1=axes('position',[0.575443786982249 0.559931506849315 0.297337278106509 0.297945205479452],'Xticklabel',[],'Yticklabel',[],'box','on','YTick',zeros(1,0),'XTick',zeros(1,0));
imagesc(a);
set(gca,'handlevisibility','off', 'visible','off')
%% thats it... i loveeeeeeeee u....

Matlab Output:

 

I have upload the data file you can also downlaod it from Here

For further details watch the following video;

 

There is a lot more about MATLAB. Visit my blogs and videos by clicking the following links.

My Videos

My Blogs



About the author

SalmaAnnex

Haripur, Pakistan

Subscribe 2618
160