有没有人知道如何在不改变内容大小的情况下改变gui编辑器(指南)中面板的大小?目前,如果我改变面板的大小,我必须花费三倍的时间来改变内容的大小,这是一个真正的痛苦.
谢谢詹姆斯
有没有办法将图形的outerposition属性赋值给具有给定句柄的图形?
例如,如果我想将图形定义为图1,我将使用:
figure(1)
imagesc(Arrayname) % I.e. any array
Run Code Online (Sandbox Code Playgroud)
我还可以使用代码更改图形的属性:
figure('Name', 'Name of figure','NumberTitle','off','OuterPosition',[scrsz(1) scrsz(2) 700 700]);
Run Code Online (Sandbox Code Playgroud)
是否有一个属性名称可用于将outerposition属性分配给指定为图1的图形?
我问这个的原因是因为我正在使用一个名为save2word的命令(来自MATLAB文件交换)来保存我对一个word文件所做的函数的一些图,我想限制我打开的数字的数量它做到了这一点.
我剩下的代码是:
plottedloops = [1, 5:5:100]; % Specifies which loops I want to save
GetGeometry = getappdata(0, 'GeometryAtEachLoop') % Obtains a 4D array containing geometry information at each loop
NumSections = size(GetGeometry,4); %Defined by the fourth dimension of the 4D array
for j = 1:NumSections
for i = 1:plottedloops
P = GetGeometry(:,:,i,j);
TitleSize = 14;
Fsize = 8;
% Save Geometry
scrsz = …Run Code Online (Sandbox Code Playgroud) 我使用pdist命令查找存储在矩阵中的x和y坐标之间的距离.
X = [100 100;
0 100;
100 0;
500 400;
300 600;];
D = pdist(X,'euclidean')
Run Code Online (Sandbox Code Playgroud)
返回15个元素向量.:
[0.734979755525412 3.40039811339820 2.93175207511321 1.83879677592575 2.40127440268306 2.75251513299386 2.21488402640753 1.10610649500317 1.81674017301699 0.903207751535635 1.99116952754924 1.05069952386082 1.24122819418333 1.08583377275532 1.38729428638035]
Run Code Online (Sandbox Code Playgroud)
有没有办法将这些距离与它们的坐标相关联,即将它们存储在具有一般行形式的矩阵中:
[Length xcoordinate1 ycoordinate1 xcoordinate2 ycoordinate2]
Run Code Online (Sandbox Code Playgroud)
找到每个长度的行?
提前致谢