function [tr,ttr]=mdsval(param,opt)
%function [tr,ttr]=mdsval(param,opt)
% get the trace and its time from string param
% opt (def 0) gets is dimension number
% Basil P. DUVAL;	March 1997
if(~isstr(param))
	disp('parameter must be a string');tr=[];
		if(nargout > 1);ttr = [];end
	return;
	end
% Option for dimension
if(nargin < 2);
	opt = 0;end
% Get trace
	tr = mdsvalue(param);
% get time if required
	if(nargout > 1)
		ttr = mdsvalue(['dim_of(',param,',',int2str(opt),')']);end
