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!