psave
(已删除)保存通信作业会话中的数据
语法
psave(fileroot)
参量
| 所有已保存文件共有的文件名部分。 |
说明
示例
创建三个数组 - 一个复制数组、一个变体数组和一个共存分布式数组。然后保存数据。(此示例在通信作业或 pmode 中有效,但在 parfor 或 spmd 代码块中无效。)
clear all; rep = speye(spmdSize); var = magic(spmdIndex); D = eye(spmdSize,codistributor()); psave('threeThings');
这会在当前工作文件夹中创建三个文件(threeThings1.mat、threeThings2.mat、threeThings3.mat)。
清除所有工作单元上的工作区并确认没有变量。
clear all
whos将先前保存的数据加载到工作单元中。确认其存在。
pload('threeThings');
whos
isreplicated(rep)
iscodistributed(D)