0

结构是这样设置的:

ClimateSubtractStruct = struct('net',NetClimatologySubtracted,'SW',SWClimatologySubtracted,'LW',LWClimatologySubtracted,'SWCF',SWCFClimatologySubtracted,'LWCF',LWCFClimatologySubtracted,'netclear',netclearClimatologySubtracted,'LWclear',LWclearClimatologySubtracted,'SWclear',SWclearClimatologySubtracted,'Clouds',TotalCloudForcingClimatologySubtracted, 'Precip',PrecipClimatologySubtracted);
fields = fieldnames(ClimateSubtractStruct);

然后我调用 GlobalCorrMap(它使用输入名称作为绘图标题和文件名的参数)。然后我打算使用 for 循环来运行 GlobalCorrMap 来比较和绘制结构中每个变量之间的相关性。下面是一个示例参数:

GlobalCorrMap(ClimateSubtractStruct.(fields{1}),ClimateSubtractStruct.(fields{3}))

我想知道 - inputname 是否可以获取在结构中调用的变量的变量名?或者我只是简单地重命名函数以便它可以将两个变量的名称作为两个单独的参数接收更好?

4

0 回答 0