Why Invalid or missing path error popped up when using saveas function in matlab?
Mostra commenti meno recenti
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 Commenti
madhan ravi
il 21 Giu 2020
Modificato: madhan ravi
il 21 Giu 2020
What happens when you feed in the figure handle to that function?
Mark Goh
il 21 Giu 2020
madhan ravi
il 21 Giu 2020
Specify the full path where you want it to be saved.
Mark Goh
il 21 Giu 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su LTE Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!