Hello,
I am using a loop to load and analyse images, I now want to be able to load a sample of the images and plot them on a subplot.
so far this is what I have tried, it just has an issue with the subplot, have sucesfully loaded all the images.
Any suggestions?
figure
x=0;
for K = 431:10:481
FileName=strcat('Embryo1_', sprintf('%03d',K),'.tif');
I = imread(FileName);%load image
x=x+1;
subplot(1,6,x)
imshow(I)
end

댓글 수: 3

Star Strider
Star Strider 2019년 3월 31일
... it just has an issue with the subplot ...
Which is ... ?
dpb
dpb 2019년 3월 31일
"it just has an issue with the subplot"
And what might that be?
The crystal ball is in the shop (yet) again...
Attempt to execute SCRIPT subplot as a function:
C:\Users\Lizzy\Documents\Year 3\EG-353 Research Project\Embryo images\Embryo images project\subplot.m
Error in notmatlab (line 19)
subplot(1,6,x)
is what is shown as an error message, I meant more that up until the subplot section everything works.

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

 채택된 답변

Star Strider
Star Strider 2019년 3월 31일
편집: Star Strider 2019년 3월 31일

0 개 추천

Rename your ‘subplot.m’ function to something else, for example:
C:\Users\Lizzy\Documents\Year 3\EG-353 Research Project\Embryo images\Embryo images project\Lizzy_subplot.m
That should solve it.

댓글 수: 5

Lizzy tatarek
Lizzy tatarek 2019년 3월 31일
I tried that, but it still shows that error message with subplot on the end of the address?
Star Strider
Star Strider 2019년 3월 31일
It shouldn’t.
What exactly did you try?
Changing the name of your .m file is an operating system command. You can do it from MATLAB with the movefile (link) function, however it’s easier using operating system utilities, such as ’File Explorer’ on Windows.
Lizzy tatarek
Lizzy tatarek 2019년 3월 31일
this is what my screen shows, in the original code I showed I had renamed it 'notmatlab' and the same thing, sorry if i'm just being dense.matlab1snip.JPG
Lizzy tatarek
Lizzy tatarek 2019년 3월 31일
So I completely deleted the subplot file, and it worked, thank you for the help!
Star Strider
Star Strider 2019년 3월 31일
As always, my pleasure!

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

추가 답변 (0개)

태그

질문:

2019년 3월 31일

댓글:

2019년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by