who know why like this?

Discussion in 'MATLAB' started by yupo, May 9, 2005.

  1. yupo

    yupo Guest

    plot(t,f)??? Error using ==> plot
    Conversion to double from sym is not possible.
    ??? Undefined function or variable 'fo'.

    Error in ==> C:\MATLAB6p1\toolbox\symbolic\@sym\double.m
    On line 45 ==> D = reshape(eval(X),m,n);
     
    yupo, May 9, 2005
    #1
    1. Advertisements

  2. yupo

    Helpful Guest

    If you have a the symbolic expression f:

    syms t fo T B
    LFM=2*pi*(fo*t+(B/(2*T))*(t^2));
    dLFM=diff(LFM,t);
    f=dLFM/(2*pi);

    You can use:

    T=1;fo=100;B=200;
    F1 = subs(f);
    t = 0:.001:2;
    ezplot(F1,t)

    or

    F2 = eval(['@(t)' char(F1)]);
    plot(t,F2(t))
     
    Helpful, May 9, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.