Brace indexing is not supported for variables of this type.

조회 수: 3 (최근 30일)
muhammad choudhry
muhammad choudhry 2021년 4월 22일
댓글: muhammad choudhry 2021년 4월 22일
Hi,
Can anyone guide me, how to correct this error please. Below is the code.
Code:
imgFile = dir('*.jpg') ;
imageNames = length(imgFile)
outputVideo = VideoWriter('test.avi');
outputVideo.FrameRate = 2;
open(outputVideo)
for ii = 1:length(imageNames)
img = imread(imageNames{ii});
writeVideo(outputVideo,img)
end
close(outputVideo)
Error:
Brace indexing is not supported for variables of this type.
Error in ImaVid_Seq (line 12)
img = imread(imageNames{ii});

채택된 답변

Matt J
Matt J 2021년 4월 22일
imageNames = {imgFile.name}
  댓글 수: 5

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by