From: AMK on
Hello,
I'm not exactly how to frame this question. I want to define a variable with a variable name. For example, the function call is
[code]
[sensor_meter] = import_ORYX_dts_meter(path,dr1,dr2,dc1,dc2);
[/code]

but there are 4 or more different sensors (a,b,c,d) and each uses the same generic function at different times (called manually). What I want to do is define some sensor id, like

sensor_id = a

and then have the above function output a variable that looks something like this - sensor_a_meter.

[code]
[sensor_'sensor_id'_meter] = import_ORYX_dts_meter(path,dr1,dr2,dc1,dc2);
[/code]

Any ideas?

Thanks
From: Walter Roberson on
AMK wrote:
> Hello,
> I'm not exactly how to frame this question. I want to define a variable with a variable name. For example, the function call is
> [code]
> [sensor_meter] = import_ORYX_dts_meter(path,dr1,dr2,dc1,dc2);
> [/code]
>
> but there are 4 or more different sensors (a,b,c,d) and each uses the same generic function at different times (called manually). What I want to do is define some sensor id, like
>
> sensor_id = a
>
> and then have the above function output a variable that looks something like this - sensor_a_meter.
>
> [code]
> [sensor_'sensor_id'_meter] = import_ORYX_dts_meter(path,dr1,dr2,dc1,dc2);
> [/code]
>
> Any ideas?

for sensor_id = 'a':'d'
sensor_meter.(sensor_id) = import_ORYX_dts_meter(path,dr1,dr2,dc1,dc2);
end
 | 
Pages: 1
Prev: ifft scale problem
Next: Laguerre function