CrazyEngineers
  • ASK demodulation code for MATLAB .

    sachleen

    Member

    Updated: Oct 25, 2024
    Views: 1.5K
    HELLO frns..
    plz tel me the code for ASk demod. for matlab. I want it urgently.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • arunchary

    MemberApr 15, 2013

    ASK Demodulation code here it is............
    function run(script)


    cur = cd;

    if isempty(script), return, end
    if ispc, script(script=='/')='\'; end
    [p,s,ext] = fileparts(script);
    if ~isempty(p),
    if exist(p,'dir'),
    cd(p)
    w = which(s);
    if ~isempty(w),
    % Check to make sure everything matches
    [wp,ws,wext] = fileparts(w);
    % Allow users to choose the .m file and run a .p
    if strcmp(wext,'.p') && strcmp(ext,'.m'),
    wext = '.m';
    end

    if ispc
    cont = ~strcmpi(wp,pwd) | ~strcmpi(ws,s) | ...
    (~isempty(ext) & ~strcmpi(wext,ext));
    else
    cont = ~isequal(wp,pwd) | ~isequal(ws,s) | ...
    (~isempty(ext) & ~isequal(wext,ext));
    end
    if cont
    if exist([s ext],'file')
    cd(cur)
    rehash;
    error(message('MATLAB:run:CannotExecute', [ s, ext ]));
    else
    cd(cur)
    rehash;
    error('MATLAB:run:FileNotFound','Can''t find %s.',[s ext]);
    end
    end
    try
    evalin('caller', [s ';']);
    catch e
    cd(cur);
    rethrow(e);
    end
    else
    cd(cur)
    rehash;
    error('MATLAB:run:FileNotFound','%s not found.',script)
    end
    cd(cur)
    rehash;
    else
    error('MATLAB:run:FileNotFound','%s not found.',script)
    end
    else
    if exist(script,'file')
    evalin('caller',[script ';']);
    else
    error('MATLAB:run:FileNotFound','%s not found.',script)
    end
    end
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register