how to call output of a problem from another program

clear all
close all
clc
Device = [1 0;2 0;3 0;4 0;5 0;6 0;7 0;8 0;9 0;10 0]
RB = [1 6; 2 7;3 4;4 9;5 1;6 12]
enodeB = [1 2 3 4 5];
occupied = [];
clc
cs=0;
for ii=1:100
selection_try20
end
success_p=cs
p_allocation=cs/100
how to call this p_allocation value from another part of this problem from another tab.both tab are opened in matlab

5 Comments

save that variable as .mat file and load it in other program where you want to use it.
save p_allocation
load p_allocation % in another program
clear all
close all
clc
Device = [1 0;2 0;3 0;4 0;5 0;6 0;7 0;8 0;9 0;10 0]
RB = [1 6; 2 7;3 4;4 9;5 1;6 12]
enodeB = [1 2 3 4 5];
occupied = [];
clc
cs=0;
for ii=1:100
selection_try_1ststep
end
success_p=cs
p_allocation=cs/100
save p_allocation
but result is showing::
Error using save
Unable to write file p_allocation: permission denied.
Error in probability_2ndstep (line 15)
save p_allocation
any fault in syntax?
It’s correct. You have write permission issues.
You are probably in a directory that you do not have write access to, such as if you have not cd'd out of the installation directory.

Sign in to comment.

Answers (0)

Categories

Asked:

on 26 Jun 2020

Commented:

on 12 Jul 2020

Community Treasure Hunt

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

Start Hunting!