Why Invalid or missing path error popped up when using saveas function in matlab?
이전 댓글 표시
Hi everyone,
I am trying to save my current figures in a loop. i get a success running it if the saveas is not in my loop. the program also can run without the saveas. but don't know why I am getting this error message: Invalid or missing path: NO PREDICTION - RSS of LTE and WLAN network of 40 m/s.
draw = 8;
queu1;
while draw > 0
figure('Name', sprintf('NO PREDICTION - RSS of LTE and WLAN network of %.0f m/s', velocity(queu)),'units','normalized','outerposition',[0 0 1 1])
plot(distance,record_RSS_LTE(queu,:),distance,record_RSS_Wimax(queu,:),distance,record_RSS_Wimax_2(queu,:),distance,record_RSS_WLAN_1(queu,:),distance,record_RSS_WLAN_2(queu,:),...
distance,record_RSS_WLAN_3(queu,:),distance,record_RSS_WLAN_4(queu,:),distance,record_RSS_WLAN_5(queu,:),distance,record_RSS_WLAN_6(queu,:),distance,record_RSS_WLAN_7(queu,:),distance,record_RSS_WLAN_8(queu,:));
xlabel('Distance(m)');
ylabel('RSS(dBm)');
legend('LTE','WiMAX1','WiMAX2','WLAN1','WLAN2','WLAN3','WLAN4','WLAN5','WLAN6','WLAN7','WLAN8');
title(sprintf('NO PREDICTION - RSS of LTE and WLAN network of %.0f m/s', velocity(queu)));
filename = sprintf('NO PREDICTION - RSS of LTE and WLAN network of %d m/s', velocity(queu));
saveas(gcf,filename,'png');
draw=draw-1
queu=queu+1
end
댓글 수: 4
madhan ravi
2020년 6월 21일
편집: madhan ravi
2020년 6월 21일
What happens when you feed in the figure handle to that function?
Mark Goh
2020년 6월 21일
madhan ravi
2020년 6월 21일
Specify the full path where you want it to be saved.
Mark Goh
2020년 6월 21일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 LTE Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!