10-16-2007 01:42 PM
Hello,
I am new to LabView and I am running into serious difficulties
transitioningfrom Matlab. I am primarily going to be using LabView for image
processing and simple tasks in Matlab seem to be very difficult (my lack of
experience) in LabView. As an example, here is a simple mathscript that generates a
moving image:
================================
k = 0:199;
numFrames = 15;
m = moviein(numFrames);
for frame = 1:numFrames
x = sin(k*2*pi/200 + pi/2 + (frame - 1)*2*pi/numFrames) + 1;
b = repmat(x’, 1, 200) * 128;
image(b), axis image
m(:,frame) = getframe;
end
movie(m)
================================
I have tried to replicate the same script in LabView, but I do not seem to
succeed due to the fact that I am unable to replicate the moviein and movie
functions in LabView. Would you be kind to guide me through the process?
Thank you,
Ermenegildo
10-16-2007 02:39 PM
Z = peaks; surf(Z)
axis tight
set(gca,'nextplot','replacechildren');
for j = 1:20
surf(sin(2*pi*j/20)*Z,Z)
F(j) = getframe;
end
movie(F,20) % Play the movie twenty times
10-16-2007 04:40 PM
10-16-2007 05:37 PM
b = repmat(x’, 1, 200) * 128;What is that first parameter supposed to be?
10-16-2007 07:11 PM
b = repmat(x’, 1, 200) * 128;
is
b = repmat(transpose(x),1,200)*128;
thank you
10-17-2007 08:44 AM
10-17-2007 01:00 PM
10-17-2007 01:12 PM - edited 10-17-2007 01:12 PM
Message Edited by smercurio_fc on 10-17-2007 01:13 PM
10-17-2007 02:08 PM
10-17-2007 02:13 PM