Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: more non-singleton rhs dimensions than non-singleton?
Replies: 9   Last Post: Jul 1, 2013 2:18 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jimmy

Posts: 39
Registered: 9/17/09
more non-singleton rhs dimensions than non-singleton?
Posted: Mar 7, 2010 7:13 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,

I am trying to compile a video from a sequence of images but I am getting the following error: Assignment has more non-singleton rhs dimensions than non-singleton
subscripts. The code is:

fileFolder = fullfile('C:\Users\Dimitar\Documents\MATLAB\Plot');
path=fullfile(fileFolder,'data*.tif');
dirOutput = dir(path);
fileNames ={dirOutput.name};
numFrames = numel(fileNames);
I = imread(fullfile(fileFolder,fileNames{+1}));
rmax=size(I,1);
cmax=size(I,2);

sequence = zeros([size(I,1) size(I,2) numFrames], class(I));

% load in array

for p = 1:numFrames
sequence(:,:,p) = imread(fullfile(fileFolder,fileNames{p}));
end

mov = avifile('test.avi','Compression','None','fps',8);

for j=1:size(sequence,3)
imshow(sequence(:,:,j));
f=getframe;
mov = addframe(mov, f);
end

mov = close(mov);
close all;

The error is in line: sequence(:,:,p) = imread(fullfile(fileFolder,fileNames{p}));

Does anyone have any idea?

Thank you
Jimmy



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.