How to save variables as *.m file

HI:

I have two variables :
A=[1,3];
B=[3,1];
 
I want to save A and B as test.m file, not test.txt or test.mat file.
Then I can call eval(test.m) to introduce these two variables.
Can anyone help me with it?
 
Thank you.
0
sjtu_yh (2)
2/4/2007 8:26:09 PM
comp.soft-sys.matlab 207257 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

0 Replies
347 Views

Similar Articles

[PageSpeed] 58
Reply:
Similar Artilces:

Help: How to save graph into a file?
Hello, I'm a newbie in Gnuplot. I use gnuplot 3.7 in RHEL 3. And I have a problem about how to save files. I use command like this plot "test.sko" using ($2):($4) with linespoints And gnuplot will plot a picture, however, I wanna save it as GIF formation or PS formation. How can I do this? Thank you very much~ Regards, Amy Lee Amy Lee wrote: > I use command like this > plot "test.sko" using ($2):($4) with linespoints > And gnuplot will plot a picture, however, I wanna save it as GIF formation > or PS formation. set term gif...

variables in the includes
I hate to ask an obvious question but I'm trying not to mess up anything worse than it is already. I have all these variables in- line. Can I do an include and take them off the file into an included file? $with_reserve = $sessionVars["SELL_with_reserve"]; $reserve_price = $sessionVars["SELL_reserve_price"]; $minimum_bid = $sessionVars["SELL_minimum_bid"]; $pict_url=$sessionVars["SELL_pict_url"]; $imgtype = $sessionVars["SELL_file_uploaded"]; $title = $sessionVars["SELL_title"]; $description = $sessionVars["SELL_descriptio...

Re: SQL equivalent of sort nodupkey but with MT 1 key variables #4
Hi Christine, Using sql group by seems to work HTH ** Dummy Data ; data class ; set sashelp.class ; output ; * Make every third rec a duplicate ; age = age + mod(_n_,3) ; output ; run ; proc sort data=class out=psort nodupkey ; by name age ; run ; proc sql ; create table sqldup as select distinct * from class group by name, age ; quit ; proc compare base=psort compare=sqldup list ; run ; output: NOTE: No unequal values were found. All values compared are exactly equal. 2009/4/16 Christine Arriola <cmarriola@hotmail.com>: > Hi everyone, &...

Store variable name in another variable
I need to store a list of variable names in a dictionary or list. I then later need to retrieve the names of the variables and get the values from the named variables. The named variables will already have been created and given a value. I hope thats clear!!! How can I do this? loial wrote: > I need to store a list of variable names in a dictionary or list. I > then later need to retrieve the names of the variables and get the > values from the named variables. The named variables will already have > been created and given a value. > > I hope thats clear!!! > > Ho...

Accessing java variables from matlab
Hi everyone, I have this problem trying to access java variables from matlab. At the moment I am running a java program with a gui from within matlab by adding the java files into the static classpath. Then i create an instance of my java program by typing into matlab l = Login This runs the program. But when i come to access my public java variables like this: l.usernameEntered i keep getting the following error: - ??? Attempt to reference field of non-structure array. Its confusing as i set up a short test program and it seems to work fine. Would anybody have any ideas how i c...

i'm looking for a Lotus notes based software.
hello, i'm looking for a Lotus notes based software. I want to ask all my workers to enter in a database what they are doing during their working houres. Then I want to make statistics and automated billing to clients. Does such application exists ? thaks for help That may be done easily I can do that for you. I am a Domino consultant : http://perso.wanadoo.fr/fustec "fred hesse" <fhe@weforum.org> a �crit dans le message de news:bjs13m$i26$1@tem.asynchrone.net... > hello, > > i'm looking for a Lotus notes based software. > >...

The variable is not visible.
Hello, With the following test program, I try to add a row to the JTable when I click on the item menu. I cant compile it. I have the following error message. dtm cannot be resolved at this ligne : dtm.addRow(ob); Regards, Tintin92 Here all the source code : // SimpleTable.java // A test of the JTable class using default table models and a convenience // constructor. // import javax.swing.*; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; import java.awt.*; import java.awt.event.*; public class TestJTable03 extends JFrame { private Action addRowAc...

Save array in Matlab Level 5 format
I was wondering if there is any package which saves LabView arrays into Matlab Level 5 format. "savml" saves the data in Level 4 format. Thanks! Hi DBM, I think you are referring to the example program found <a href="http://digital.ni.com/public.nsf/websearch/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument">here</a>. This code is open source, and so you can modify it as you need to. I cannot find a premade example designed for Matlab Level 5 format. However, if you know the format, you can always change this code to work on Level 5 format. Jeremy L. National...

Looking for a C++ file manipulation API (find, cut, paste ...)
Hi all, I have a really short time to perform a C++ development task and I need to : - find some string in a file - move some text data from one place of the file to another - replace some data in the file The problem is my file manipulations methods have to be robust and I have not time enough to test everything. Having a C++ file API doing all this would help me a lot. Do you know a portable (Windows, Unix, Linux) API which would implement all these features ? (I already looked in the GNU freeware directory but I did not find what I was looking for) Thanks in advance for your help. ...

Creating stand alone excecutable file
Is it posible to convert one of my matlab script file in to stand alone executable file for windows. " Reddy Divakar" <cdreddy@iigs.iigm.res.in> wrote in message <gtbjof$clp$1@fred.mathworks.com>... > Is it posible to convert one of my matlab script file in to > stand alone executable file for windows. Hello-- You may have to look for matlab compiler. Also, the below link might of use to you: http://www.mathworks.com/products/demos/compiler/deploytool/index.html EnJoY " Reddy Divakar" <cdreddy@iigs.iigm.res.in> wrote in message <gtbjof$clp$1@...

save each row of cell in txt
hello, I have a cell (p) like this one length diameter 5,76196E-07 2,01087E-07 5,65652E-07 2,07E-07 5,76087E-07 1,95652E-07 5,65326E-07 2,11957E-07 5,76196E-07 2,01087E-07 5,76087E-07 2,06522E-07 5,76196E-07 2,11957E-07 5,65326E-07 2,11957E-07 5,54457E-07 2,11957E-07 and I would like to save each row in a different txt file (1,2,3,4,....) file1= 5,76196E-07 2,01087E-07 file2= 5,65652E-07 2,07E-07 .. .. .. can you help me with the code? ...

Saving Email
Got a question; I'm using Thunderbird as my email client with no issues on an Intel IMac with OSX10.4.11 I purchased an email backup pro program that I'm using for email backup. This gives me a complete email restore for everything, but the file isn't accessible of course so the saved email can be seen. Is there in existence a program that allows you to archive email so that it can be referenced and read if necessary on a backup media? In other words, what I'd like to do is transfer each month's mail from my sent and archive folder to off system media, then delete ...

Neat variable replication across comm channels
I am developing a new GUI that must display at multiple locations, all of which must be kept in sync, i.e., changes made at any location must be reflected at all other locations. One approach that I have used before is to have one central app that spawns N toplevels, each with a clone of the GUI, all tied to the same -textvariables and -variables. That's easy, but if one of the remote X dsplay connections is broken, as when an operator logs out while one of the GUIs is displayed, then the whole app crashes (Tk bug #923174). Another approach is needed. Instead of one N-headed app,...

Flag control variable
hello, i'd like to know how to set up a flag to change a variable, for example, i want a simple script to combine 2 numbers, sum = num + another_num print "Now the sum of the numbers equals : ", sum how could i make it so that if i type python ./script.py 21 41 that i get the sum of 21 and 41 ? luke --f46d04389045e49c6804f22500d7 Content-Type: text/plain; charset=UTF-8 On Tuesday, February 11, 2014, <luke.geelen@gmail.com> wrote: > hello, > i'd like to know how to set up a flag to change a variable, > for example, i want a simple scri...

Where to save
Friends, I using C5 in my application. I want my tps file was backup in any place/folder that we can choose.How to make a simple program to save that ? I want the directory to save is variable. It means, the user can save it in where he wants. Like save to C: D: or F:\backup Thanks in advance Erwin You're probably best off saving the information in an INI file. Look at PUTINI and GETINI. Either use a global variable as the NAME() attribute of your backup files and make sure that variable is "primed" (from the ini information) before any OPEN, or use PROP:Name to set it (again...

Most efficient way to delete files containing strings in long list?
Interesting problem that I hope isn't N-P complete. :) If I've got an arbitrarily long list of N unique strings: abcdefghij lmnopqrstuv wxyz#@!%* 123456789000 .....etc what's the most efficient means of deleting all files in a particular (large) directory that contains any one of the strings in the list? I know I could do a bash script that ran through the string list with xargs, then grepped every file in the directory for each string in turn, then deleted the files that match, but is there a simpler or more efficient way? (A simplification is that no string is a substring of an...

unwanted formatting of saved text file
Hello, I am using Matlab to make some calculations of some data and then am writing an .m file to export the results in text format so they can be used in another program. This other program unfortunately, is very picky with its input files. When I open the text file that I have written in Wordpad (or text edit for Mac) it looks fine. But in Notepad, an newline command (\n or \r) isn't recognized and gives a box, thus ruining the format of the text file. The basic code looks something like this: fid=fopen('test.txt','at') fprintf('wish this would work') fprintf(...

OT: using DEVIL library to save alpha channel in a BMP
Hi (as some people here seems to use this library) I dont succeed to save a grayscale BMP (the alpha channel) with DEVIL How can i do that ? Here it is the piece of my code [...] ilGenImages(1, &ImageName); ilBindImage(ImageName); if(T->bits==8) Format=IL_LUMINANCE_ALPHA; if(T->bits==24) Format=IL_RGB; if(T->bits==32) Format=IL_RGBA; ilTexImage(T->large,T->high,1,T->bits/8,Format,IL_UNSIGNED_BYTE,T->pt); ilEnable(IL_FILE_OVERWRITE); if(!ilSaveImage(filename)) { printf("ilGetError %d !\n",ilGetError()); return(FALSE); } ilDeleteImages(1,&I...

CP/M and C128
Hello, please I would like to know if there is a reference site for CP/M software for the C128.. Google showed me some links but all them doesn't contain very much sw. ....or very few CP/M programs were made for C128? Again, I remember something about a sort of "restrictions" for the Commodore version of CP/M. (CP/M-plus version only? What about?) Thank you all. Ciao -- // \\//http://sites.google.com/site/retrolabels On Mon, 22 Mar 2010 21:45:51 +0100, PK wrote: > Hello, > please I would like to know if there is a reference si...

Bind Variables in Oracle lite
I want to use a bind variable in order to insert a binary data in a raw field. I do this in a C# app., using parameters, in Oracle Server it works successfully but when I change the conection to a Oracle Lite Data Base the bd returns the error "37000[POL-5228]: Syntaxis Error". The sql is like this: "insert into GENERIC_TABLE (id, data) values ("+id.ToString()+", :Data)" And after I insert the parameter. Does someone know if in Lite the bind variables syntaxis is diferent? Could you help me? What's happend in lite version? Thanks in advance ...

Using the __builtins__ module to assign new global variables
Hi, For the Python experts out there: Are there any side effects in assigning new variables to the __builtins__ module for the purpose of exposing variables to imported modules. For example. #/ main file class Test: pass mytest = Test() #/ instance of a class __builtins__.mytest = mytest import abc #/ ----------------------- #/ This is the abc.py module file #/ This should work because of the __builtins__ above print mytest Thanks. Opinder wrote: > Are there any side effects in assigning new variables to the > __builtins__ module for the purpose of exposing variables to im...

Saving Printer Setups
While the default printer for my image processing computer is a LaserJet because I do a great deal of word processing on it, it's not the printer I use for PhotoShop. Is there any way to save (multiple) printer/page setups so that I can recall them quickly? TIA Norm ...

How to save lwp::useragent state?
Hello. I have a perl script that uses a LWP::Useragent to retrieve data from a password protected page. Here is how I have set the authentication: my $uagent = new LWP::UserAgent; $uagent->agent('My Cool Browser'); $uagent->conn_cache(LWP::ConnCache->new()); $uagent->cookie_jar(HTTP::Cookies->new('file'=>cookies1', 'autosave'=>1,)); $uagent->credentials('www.mywebsite.com:80, 'test account', 'john'=> 'john123'); $myurl = 'http://www.mywebsite.com/secret'; $uagent->get($myurl); print $uagent->cont...

Printing a text file?
Hi All Okay, I've got a report that runs perfectly. Designed originally with the report wizard and enhanced with about 8 subreports and other stuff. Works great. However, I also now need to have the same report printed to a text file rather than on a piece of paper. Can I utilize the this report I worked so hard on? Is there an easy way to print to a text file from Access instead of onto a piece of paper? I need it ending up as a standard text file that can be imported into another organization's system, however they do that. Any ideas? TIA ron Hi, this may help try set...

Importing text files with multiple headers
I am trying to import text files into matlab. The problem is that within the files there is a text header then some numerical data then header, data, header etc. When I try to import the file (specifying that the numerical data starts on line 3) Matlab imports the first set of numerical data up until the next alphabetical line but not the whole file. I have until now just repetively specified a larger and larger header (in a loop) as all the numerical data are of equal numbers of lines, but this is not nice and I miss some data for longer files. Does anyone know of a command to ignore all ...