??? Undefined function or variable 'PathName'.

hi all
Can you help provide solutions
I tried to call data from txt file

disp(input('input, press enter'))
[FileName.PathName]=uigetfile(('*.txt'), 'browser file')
fileToRead=fullfile(PathName,FileName)
propil=importdata(fileToRead)



FileName = 

    PathName: 'prop.txt'

??? Undefined function or variable 'PathName'.

Error in ==> input_data_t3d at 4
fileToRead=fullfile(PathName,FileName)
0
wahyoe
3/24/2011 5:04:04 AM
comp.soft-sys.matlab 208511 articles. 8 followers. lunamoonmoon (258) is leader. Post Follow

5 Replies
321 Views

Similar Articles

[PageSpeed] 50
On 3/23/2011 10:04 PM, wahyoe Unggul wrote:
> hi all
> Can you help provide solutions
> I tried to call data from txt file
>
> disp(input('input, press enter'))
> [FileName.PathName]=uigetfile(('*.txt'), 'browser file')
> fileToRead=fullfile(PathName,FileName)
> propil=importdata(fileToRead)
>
>
>
> FileName =
>
>      PathName: 'prop.txt'
>
> ??? Undefined function or variable 'PathName'.
>
> Error in ==>  input_data_t3d at 4
> fileToRead=fullfile(PathName,FileName)


Change the '.' to ','  in this line between the FIleName and PathName


[FileName.PathName]=uigetfile(('*.txt'), 'browser file')


--Nasser

0
Nasser
3/24/2011 5:17:14 AM
"Nasser M. Abbasi" <nma@12000.org> wrote in message <imek4v$l3o$1@speranza.aioe.org>...
> On 3/23/2011 10:04 PM, wahyoe Unggul wrote:
> > hi all
> > Can you help provide solutions
> > I tried to call data from txt file
> >
> > disp(input('input, press enter'))
> > [FileName.PathName]=uigetfile(('*.txt'), 'browser file')
> > fileToRead=fullfile(PathName,FileName)
> > propil=importdata(fileToRead)
> >
> >
> >
> > FileName =
> >
> >      PathName: 'prop.txt'
> >
> > ??? Undefined function or variable 'PathName'.
> >
> > Error in ==>  input_data_t3d at 4
> > fileToRead=fullfile(PathName,FileName)
> 
> 
> Change the '.' to ','  in this line between the FIleName and PathName
> 
> 
> [FileName.PathName]=uigetfile(('*.txt'), 'browser file')

hai nasser
thanks Thank you very much
> 
> 
> --Nasser
0
wahyoe
3/24/2011 5:35:20 AM
hai nasser
why at the time of data occur as a result used below

C:\Documents and Settings\W@hyOe\My Documents\MATLAB\eploitasi\data input\prop.txt


prop =

  1.0e+005 *

    0.0000    2.1000    0.0045         0    0.0000
    0.0000    2.2000    0.0080         0    0.0000
    0.0000    2.6000    0.0050         0    0.0000
    0.0000    2.8000    0.0070         0    0.0000


ans =

prop.txt

>> C=prop'
??? Undefined function or variable 'prop'.
0
wahyoe
3/24/2011 6:23:04 AM
On 3/23/2011 11:23 PM, wahyoe Unggul wrote:
> hai nasser
> why at the time of data occur as a result used below
>
> C:\Documents and Settings\W@hyOe\My Documents\MATLAB\eploitasi\data input\prop.txt
>
>
> prop =
>
>    1.0e+005 *
>
>      0.0000    2.1000    0.0045         0    0.0000
>      0.0000    2.2000    0.0080         0    0.0000
>      0.0000    2.6000    0.0050         0    0.0000
>      0.0000    2.8000    0.0070         0    0.0000
>
>
> ans =
>
> prop.txt
>
>>> C=prop'
> ??? Undefined function or variable 'prop'.

I do not understand.

PLease post COMPLETE working code, from the start to the end. Not
just a fragment.

--Nasser
0
Nasser
3/24/2011 6:39:06 AM
data file txt 

1  2.10e5   450   0   7.85e-5
2  2.20e5   800   0   7.85e-5
3  2.60e5   500   0   7.85e-5
4  2.80e5   700   0   7.85e-5

function [data,f2r,prop,prop2] = input_data_t3d
disp(input('input, press enter'))
[data,directory]=uigetfile({'*.txt';'*.dat';'*.mat';'*.rtf';'*.*'},'File Selector')
f2r=fullfile(directory,data)
prop=(importdata(f2r))

output

input, press enter

data =

coord.txt


directory =

C:\Documents and Settings\W@hyOe\My Documents\MATLAB\eploitasi\data input\


f2r =

C:\Documents and Settings\W@hyOe\My Documents\MATLAB\eploitasi\data input\coord.txt


prop =

  1.0e+003 *

    0.0010         0         0    4.2426
    0.0020    4.2426         0    4.2426
    0.0030    4.2426         0         0
    0.0040         0         0         0
    0.0050    2.1213    4.0000    2.1213

if data is "prop" I use for subsequent calculations,
then the variable is not recognized

>> C=prop.*2
??? Undefined function or variable 'prop'.
0
wahyoe
3/24/2011 7:10:14 AM
Reply:
Similar artilces about - ??? Undefined function or variable 'PathName'.:

Help with perl special variable
Hi gurus, I m reading a regexp and a string from an external file (actually my program configuration file). After, I need to do a string matching, using previously loaded regex, and print the "destination" result, using special variable $2, hardcoded in my conf. I have no luck..please give me some hints: Here is my configuration line: rule (^.*blabla-dir/blabla-file/)(.*$) /somedirectory/ somefile/$2 LABEL perl code extract: .... /(^rule)\s+(.[^\s]+)\s+([\/\w\$]+)\s+(\w+)/ $regex[$i]=$2; $destination[$i]=$3; ... ... $_="/blabla-di...

function roundn
How to use the function roundn in MATLAB 6.5 Thank you very much by help On Sat, 29 May 2004 13:39:47 -0400, Bill wrote: > How to use the function roundn in MATLAB 6.5 > Thank you very much by help Type 'help roundn' at the Matlab prompt. If that doesn't help, then please be specific about what you're getting stuck with. Dan ...

Function parameter
Hi, I'm new to PHP and have a small problem. Assume you define a function that is called with a constant as parameter. Within that function, based on some condition it calls itself recursively. Example: <?php function Test($firstcall) { echo "(enter) firstcall=$firstcall<br>\n"; if (some_condition) { Test(0); } echo "(leave) firstcall=$firstcall<br>\n"; } Test(1); ?> I need that variable/parameter before and after the main part of the function. For the first call, the (enter) output shows that $firstcall=1, but the...

US-AL-Huntsville: SAP SEM Functional Analyst, Business Functional skills, FICO; (45281932409)
US-AL-Huntsville: SAP SEM Functional Analyst, Business Functional skills, FICO; (45281932409) ============================================================================================= Position: SAP SEM Functional Analyst Reference: SMC01103 Location: Huntsville AL Duration: C-P Skills: 4+yrs SAP R/3 experience with strong SAP SEM configuration and implementation. Excellent business functional skills. Knowledge of FICO. 2+yrs of Data Warehousing, mySAP configuration experience or Budget...

??? Undefined function or variable "data".
When I run this GUI file I got this error: ??? Undefined function or variable "data". Error in ==> TR1000GUI>pushbutton1_Callback at 115 DataNode(min:max,Column)=data(:,2); Error in ==> gui_mainfcn at 96 feval(varargin{:}); Error in ==> TR1000GUI at 42 gui_mainfcn(gui_State, varargin{:}); Error in ==> @(hObject,eventdata)TR1000GUI('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) ??? Error while evaluating uicontrol Callback I want to rear several csv files and then put them in the DataNode Vector, I f I run ...

generic to-string function
Hello! I've just read the PCL chapters about CLOS and since I find it a bit annoying that ther is no unified way of converting different objects into strings, I gave it a try: (defgeneric to-string (item) (:documentation "Returns item as a string.") (:method ((item string)) item) (:method ((item character)) (string item)) (:method ((item symbol)) (string item)) (:method ((item number)) (write-to-string item)) (:method ((item sequence)) (if (every #'characterp item) (coerce item 'string) (error "Sequence item contains ...

Array references in SUM function
SAS-Lers, (Note: the following sample is extremely simplified. So I ask you to stick with the question and not bring up suggestions like using proc means, freq, whatsoever). I have 100 variables (let's say var1 to var100) whose value is either 0 or 1. I want to build new variables (newvar1 to newvar10) so that newvar1 is the sum of var1 to var10, newvar2 is the sum of var11 to var20 and so on. A good working example for array processing, I thought, and came up with something along these lines (tailored to be cut, pasted and tested): data _null_; array vars{*} var1-var100; ...

function redefinition and the standard
Hello, In IE, when you redefine a function it will be overwriten by the latest declaration. Is that by the standard or by this browser implementation? -- Elias lallous wrote: > Hello, > > In IE, when you redefine a function it will be overwriten by the latest > declaration. > > Is that by the standard or by this browser implementation? > > -- > Elias function abc() { alert('hi'); } function abc() { alert('bye'); } abc(); is equivilent to var abc = new Function("alert('hi');"); var abc = new Function("alert('bye'...

Re: Overflow error with lag function #2
Cynthia, Let's look at the problem instead of your solution. I think you want the number of days between the first value of DATE1 and the last value of DATE2 for each ID when the data has been sorted by ID DATE1. Now that is a much simpler problem than trying to figure out what you want your code to do and why it isn't doing it. First reduce the problem to one record per ID getting the number of days as ST2ED. data test ; input @1 id date1 :DATETIME22. date2 :DATETIME22. ; format date1 date2 datetime22. ; datalines; 1 26MAR2002:00:00:00.000 01JUL2002:00:00:00.000 2 24MAY2002:00:...

Resizing images for montage function #2
Is there an easy way to calculate a size for images that can be used with the montage function so that the size is compatible with that function figuring out the number of images to display per row? I want use it to resize arbitrary-sized images to a size compatible with montage. I know how to resize an image once I know how big. Thanks, Alan ...

Use global fields instead of variables
Howard Schlossberg wrote: > I have come to believe that the role of global fields should and will > become very limited. The only reasons I can think of to use global fields > are for display purposes: > > 1) You need to display some temporary value on a layout. > > 2) You have a portal based on a special relationship where you want to > allow users to change how or what is displayed in the portal. > > > Anything I'm missing or any downsides to this way of thinking? I try to pass a $$variable from one file to another: I set a $$variable and call a sc...

assuming certain properties about variables
Hi, let's say I have defined the following function: f[x_?Positive] = x Now I want to evaluate f with a variable t: f[t] As mathematica knows nothing about t, the output is f[t] instead of t. How can I tell mathematica, that t should be a positive number so that Positive[t] evaluates true and then f[t] evaluates to t? Of course this is just an example, which should present what I would like to know. Thanks in advance. Hi Benjamin, You can use UpValues to accomplish your goal: In[1]:= Clear[f]; f[x_?Positive] = x Out[2]= x In[3]:= Clear[t]; t /: Positiv...

using function generator
i want to plot pressure against time using a function generator. so when i change the pressure and time it will change the graph. what would i use to do this? ...

help needed with predict function
Hello! I wrote the following code: date=csvread('date.csv'); %the data variable contains 9356 lines and 2 columns %the first column contains the time the measurement took place %the second column contains the measured value a=size(date); y=iddata(date(1:fix(a(1)/2),2)); %i use the 1st half of the data to estimate the model using the ar function mod=ar(y,2); pred=predict(mod,iddata(date(:,2))); %end code Is pred(fix(a(1)/2)+1:end) really the prediction of my second half of data using the model estimated or it's just a simulation of the model? I want to predict the next 100 values...

Problem with undefined references
Hello all, I'm trying to use lcc-win32 (under Win 7) to compile a code I downloaded (that was developed on lcc-win32). Compilation results in "undefined reference" errors. Here is the output: Wedit output window build: Wed Nov 30 14:20:41 2011 tide2idx.obj: multiple definition of _main first definition is in file wxtidelcc.obj loclib.obj: multiple definition of _allocate_copy_string first definition is in file tide2idx.obj xprintf.obj: multiple definition of _printf first definition is in file wxtide.obj Error d:\ioannis\documents\wxtide32\wxt47_source\wxtide.c 3841 undefined...

checking a variable
I'm a bit new to shell scripting, but... I'm using the read command to get info from a user in a shell script: read -p "Choose a number from the list: " num my question is: Is there an easy way to make sure that the variable $num is a number AND is between 1 and 27? I'm sure there must be... On Sat, 02 Jun 2007 23:18:57 -0000, ted_graham <teddy.m.graham@gmail.com> wrote: > > > > I'm a bit new to shell scripting, but... I'm using the read command > to get info from a user in a shell script: > > read -p "Choose a number ...

What is an undefined offset? An undefined index?
I just switched error_reporting to ALL so I could debug my site. I got a huge page full of errors. One of the most common was that in my arrays I'm using undefined offsets and indexes. These still work fine, but with error reporting at all they are marked as errors. Why? What am I doing wrong? www.monkeyclaus.org In article <da7e68e8.0307121026.2559e8c5@posting.google.com>, lkrubner@geocities.com (lawrence) wrote: > I just switched error_reporting to ALL so I could debug my site. I got > a huge page full of errors. One of the most common was that in my > arrays I'm u...

Embedding python: GCC gives errors of "undefined reference" to Py_* functions.
Hey! I am trying to embedd python into a C programe of mine. But when I try to compile the C code, gcc gives errors like "undefined reference to `Py_Finalize'" and the same kind for all the other functions. I have incuded "Python.h". Any idea what might be wrong? Thanks. OK, I am not ashamed to admit that I am ashamed as I didn't search the group for my problem before posting it yet again. The solution was right there. I have link in my libpython2.4.so while compiling. $gcc -I/usr/include/python2.4/ -lpython2.4 -o foo foo.c Shuaib wrote: > Hey! > >...

US-AL-Huntsville: SAP FI/CO Functional Analyst, SAP ISPS, AP, Funds management; (45301632407)
US-AL-Huntsville: SAP FI/CO Functional Analyst, SAP ISPS, AP, Funds management; (45301632407) ============================================================================================= Position: SAP FI/CO Functional Analyst Reference: SMC01393 Location: Huntsville AL Duration: C-P Skills: 9+ yrs financial systems analysis with strong SAP ISPS (Industry Solution Public Sector) and experience in Accounts Payable, Procurement and Funds Management. In-depth knowledge of financial accounting practices. Oth...

dchange/complex variable
Hi, how to change variables in PDE combining them into a comples variable z(t)=x(t)+I*y(t) using "dchange" command? pde1:=diff(x(t),t)^2+diff(y(t),t)^2; juras In article <csj4at$qt6$1@sunflower.man.poznan.pl>, JS <jerzy@rovib.amu.edu.pl> wrote: |>how to change variables in PDE combining them into a comples |>variable z(t)=x(t)+I*y(t) using "dchange" command? |>pde1:=diff(x(t),t)^2+diff(y(t),t)^2; This looks to me like an ODE. But anyway: > normal( PDEtools[dchange]({x(t)=(z(t)+zbar(t))/2,y(t)=(z(t)-zbar(t))/(2*I)},...

Optimization of a Objective function that consist many numerically integrated function
Hello, I am dealing with a nonlinear objective function that contains many numerical integral functions. Also i have to pass some extra parameters inside of each integral function.I have tried several times to solve this but i have failed . Below i have shown the format of my objective function : expected total cost = normal function(P,D,R,thita) + integral function 1(P,D,thita,lamda,R) + integral function 2((P,D,thita,lamda,R)+......... Here P,D,R,thita is input parameters . Also i have to employ numerical integration because this integral function cannot be solved analyticall...

Best method to increment a variable.
Several textbooks, including Javascript for Dummies (2005), show the "i=++i" method of incrementing a variable. I have been using this method but I have been recently informed by some experts in the Google Maps API group that this method is confusing and wasteful of resources and is now redundant and I should use "++i" or "i=i+1". Any strong opinions in this group? Steve: and is now redundant and I should use "++i" or "i=i+1". I think that -prefix increment operator (++i)- is more effective and its action are clear enough. On 16 =C4=C5=CB,...

WDEN wavelet function #2
Has anyone had any luck using wden function from the wavelt tool box in a COM component. I am currently having a lot of probelms passing variant arrays from excel to the com object. In matlab I have no problems even on the same data set, but via a com object with excel I have had no luck at all. All I get is a an error about 16 bit integers and even though I use different formats and mwutl object I still have no luck. When coerceing to double I then get an error concerning the ''eval'' function. Please help thanks adam ...

calling functions in another executable
Hello, I have a UNIX GCC executable with a function that I want to call from a separate exe. I know the address and function signature from using the "dis" disassembler. Is there a way to link into that executable (it has its own main) from a separate executable with a main() at run time and call that function in the 2nd executable? This is my last resort since we don't have the source code to the function but we still have programs compiled with it! Thanks, Carl pkc4rs@lycos.com writes: > I have a UNIX GCC executable Presumably you have a gcc-compiled executable, no...

problem in the input function of ode45
hi i'm a new user to Matlab and would like to receive some help. I have to solve 3 simultaneous first order ode's. before the start of solution within the function i've to check for two temperatures and compare them and then decide which of the two set of eqn i've to use. a simple flow chart is as follows : 1. check for two temperatures 2. select whether air is unsaturated or supersaturated 3. if unsaturated then use the equations for dy according to unsaturated condition otherwise supesaturated condition. My PROGRAM IS AS SHOWN BELOW: options=optimset('Display'...