1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

? Error: Missing MATLAB operator

  1. Jul 4, 2008 #1
    ??? Error: Missing MATLAB operator

    Hi I am trying to run a program (My version of matlab is 7.01(R14))
    called FindPeaks.m

    function [peaks]=FindPeaks(fname)

    eval(['load fname.dat -ascii'])
    eval(['timedata=',fname,'(:,1);']); % log10 scale !!!

    then I enter my file which doesn't have any extension:

    my file name is: sam_2mem_e1.FLT.a.171

    ??? Error: Missing MATLAB operator.

    Error in ==> FindPeaks at 5
    eval(['timedata=',fname,'(:,1);']); % log10 scale !!!

    Thank for any suggestions
    Last edited: Jul 4, 2008
  2. jcsd
  3. Jul 4, 2008 #2
    Re: ??? Error: Missing MATLAB operator

    try writing its type as extension............
  4. Jul 4, 2008 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Re: ??? Error: Missing MATLAB operator

    You're trying to apply the (:,1) slice operator to a fname, which is a string, not a matrix. Throw a 'whos' in there and look at the types.

    - Warren
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: ? Error: Missing MATLAB operator
  1. Matlab / operation (Replies: 1)

  2. Matlab Error (Replies: 1)

  3. Error code in Matlab (Replies: 3)