Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: can't fopen????

Subject: can't fopen????

From: liu I-YIN

Date: 22 Jul, 2008 03:00:06

Message: 1 of 3

hi all,
   I used matlab 14.4 to transfer M-file to c code.
The original M-file is
fid = fopen('tx_para.txt','r')  It works
   But after it transfer to c code, it shows error:
??? Undefined function or method 'deploywhich' for input
argument of type 'char'.
Error in = = > fopen at 16
Error in = = > get_tdv_params at 230
Error in = = > tdv at 61
Error in = = > top at 12

Due to matlab 14.4, I can not export every M-file to C-
file by one-one mapping. I can only export the top.m,
which means I can not really “see” the get_tdv_params
after transfer /_\
How should I do?


Subject: can't fopen????

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jul, 2008 16:43:36

Message: 2 of 3

In article <g63ifm$rug$1@fred.mathworks.com>,
liu I-YIN <iliu@atheros.com> wrote:

> I used matlab 14.4 to transfer M-file to c code.

I'm not sure what you mean by that. Do you mean that you
used the Matlab Compiler ? If so, then which release of the Matlab
Compiler?

>The original M-file is
>fid = fopen('tx_para.txt','r')  It works
> But after it transfer to c code, it shows error:
>??? Undefined function or method 'deploywhich' for input
>argument of type 'char'.
>Error in = = > fopen at 16
>Error in = = > get_tdv_params at 230
>Error in = = > tdv at 61
>Error in = = > top at 12

Please use

which fopen

to be sure that you are getting the built-in fopen and not
a user-defined function that happens to be named fopen.
fopen line 16 is normally a comment line, part of the 'help' description
of fopen.

--
  "I like to build things, I like to do things. I am having
  a lot of fun." -- Walter Chrysler

Subject: can't fopen????

From: liu I-YIN

Date: 23 Jul, 2008 10:17:01

Message: 3 of 3

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g652no$elr$1@canopus.cc.umanitoba.ca>...
> In article <g63ifm$rug$1@fred.mathworks.com>,
> liu I-YIN <iliu@atheros.com> wrote:
>
> > I used matlab 14.4 to transfer M-file to c code.
>
> I'm not sure what you mean by that. Do you mean that you
> used the Matlab Compiler ? If so, then which release of
the Matlab
> Compiler?
  I change it to matlab 2006b, glibc 2.3.3.
  but it still doesn't work.
  the way I transfre the M-file is like
  mcc -I /code
      -I /matlab/2006b/toolbox
      -I /matlab/2006b/extern/include
      -W lib:libmatlab -T link:lib /code/top.m
      -f my_mbuildopt.sh
   

> >The original M-file is
> >fid = fopen('tx_para.txt','r')  It works
> > But after it transfer to c code, it shows error:
> >??? Undefined function or method 'deploywhich' for
input
> >argument of type 'char'.
> >Error in = = > fopen at 16
> >Error in = = > get_tdv_params at 230
> >Error in = = > tdv at 61
> >Error in = = > top at 12
>
> Please use
>
> which fopen
>
> to be sure that you are getting the built-in fopen and
not
> a user-defined function that happens to be named fopen.
> fopen line 16 is normally a comment line, part of
the 'help' description
> of fopen.

  chceked.
  
  the fopen is bulit-in function /__\

>
> --
> "I like to build things, I like to do things. I am
having
> a lot of fun." -- Walter
Chrysler

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
transfer liu I-YIN 21 Jul, 2008 23:05:11
c liu I-YIN 21 Jul, 2008 23:05:11
fopen liu I-YIN 21 Jul, 2008 23:05:10
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics