f



Outputting lines of best fit

I have a set of data in an array (11000,207). I've been asked to detrend the data in each of the 207 columns individually. I've tried using the Matlab detrend but I cant get it to work in a sensible way for this data.
Instead I've been trying to ouput the equation for a line of best fit for the data in each column and then subtract that from the data.
Seems a simple task but the only way I have found to find a line of best fit is doing it manually once you have a figure up using the best fitting option in tools. Obviously I don't want to do this manually 207 times. 
Does anyone know of a way I can do this?
0
9/27/2011 10:54:14 AM
comp.soft-sys.matlab 211266 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
391 Views

Similar Articles

[PageSpeed] 16

On 9/27/2011 5:54 AM, James wrote:
> I have a set of data in an array (11000,207). I've been asked to detrend
> the data in each of the 207 columns individually. I've tried using the
> Matlab detrend but I cant get it to work in a sensible way for this data.

That doesn't seem right; that's precisely what detrend() does.

Unfortunately, the description you've provided of the problem and lack 
of an example of the problem means nobody can provide any useful assistance.

> Instead I've been trying to ouput the equation for a line of best fit
> for the data in each column and then subtract that from the data.
> Seems a simple task but the only way I have found to find a line of best
> fit is doing it manually once you have a figure up using the best
> fitting option in tools. Obviously I don't want to do this manually 207
> times. Does anyone know of a way I can do this?

Yes,

a) detrend
b) polyfit/polyval but have to do column at a time
c) doc \

--

0
none1568 (7453)
9/27/2011 1:22:33 PM
Reply:

Similar Artilces:

how to fit a set of points by segmented but continuous lines in matlab?
e.g. x = 0:30; y = [2 1.98 1.90 1.85 1.78 1.74 1.69 1.65 1.63 1.55 1.48 1.34 1.18 1.05 0.930 0.770 0.580 0.420 0.290 0.150 0.04 0 -0.01 -0.03 -0.05 -0.01 0.01 0 0.01 -0.01 0.460]; A single linear regression is easy to implement in matlab. but obviously, the plot of x-y show that three welded lines are more suitable. how to make this in matlab? Using for example this package: http://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation >> BSFK(x,y,2,10,[],struct('animation',1,'sigma',0.01)) Here is the result http://imageshack.us/photo/my-images/85/fitbybsfk.png/ Bruno "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jgduiq$eok$1@newscl01ah.mathworks.com>... > Using for example this package: > http://www.mathworks.com/matlabcentral/fileexchange/25872-free-knot-spline-approximation > > >> BSFK(x,y,2,10,[],struct('animation',1,'sigma',0.01)) > > Here is the result > http://imageshack.us/photo/my-images/85/fitbybsfk.png/ > > Bruno A soooooo-coooooool tool!!! That's exactly what I needed. wonderful! especially the automatic searching for knots. Thx, Bruno. ...

Read from *.txt inside SimEvetns Embedded Matlab line by line
Hi all, I have a text file named WF.txt and it has the following data: Job Task Cores ET Depend 1 1 5 10 1 2 15 25 1 1 3 10 15 2 1 4 20 10 2,3 These are specifications for workflow jobs stored in WF.txt, I have simulated a queueing model in SimEvents. I have an entity generator with the attributes matching the text file's headers i.e. Job, Task, etc.. I've designed my model to have the entitiy generator placed before a matlab embedded function, and what I want to be able to do is extracting one row from the text file for each generated entity at a time and then assign the right value for the right attribute. For instance I want my first entity to be like this: Job = 1; Task = 1; Cores = 5; ET = 10; Depend = '', and for the second entity to have it as follows: Job = 1; Task = 2; Cores = 15; ET = 25; Depend =1. I'm not sure whether it's best to use Embedded Matlab Editor or Function, as for the latter it requires me to do something with eml.extrinsic. The other minor issue here is for 'Depend' as it can have multiple values like in the last row, how can I then assign those to an entity attribute inside SimEvents, adn what format do you suggest for it? Many thanks you guys and looking forward your comments :-). ________________ Tiger ...

What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit)
What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit) I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called. I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE. Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to ...

Is there anyway I can transfer the output of my matlab program to the Excel? I need to generate a table from my program's output.
Matlab to Excel "Amy" wrote in message <jksmel$lti$1@newscl01ah.mathworks.com>... > Matlab to Excel % To name a few: doc xlswrite doc cvswrite doc dlmwrite % If those don't help, you need to be more specific. "someone" wrote in message <jksn4i$ohi$1@newscl01ah.mathworks.com>... > "Amy" wrote in message <jksmel$lti$1@newscl01ah.mathworks.com>... > > Matlab to Excel > > % To name a few: > > doc xlswrite > doc cvswrite > doc dlmwrite > > % If those don't help, you need to be more specific. Thank you... it works exactly what I need. ...

using Line in in Matlab
i am trying to make a pressure meter. i am using matlab for it. microphon port is already engaged for microphone based pressure sensor. I have mad a LVDT for sensing the high pressure. I want to connect the output of th LVDT to the line in port of sound card. but I dont know how to access th line in port from matlab. So please help me with the matlab code fo accessing the line in port of my soundcard. thanks. This is Iftee fro BUET, Bangladesh ifteebuet wrote: > i am trying to make a pressure meter. i am using matlab for it. microphone > port is already engaged for microphone based pressure sensor. I have made > a LVDT for sensing the high pressure. I want to connect the output of the > LVDT to the line in port of sound card. but I dont know how to access the > line in port from matlab. So please help me with the matlab code for > accessing the line in port of my soundcard. thanks. You might want to have a look at the data aqcuisition toolbox. You may find the group comp.soft-sys.matlab more useful for questions about matlab. Rune If you have the signal processing toolbox then there is a command called waverecord. Mike "ifteebuet" <ifteebuet@yahoo.com> wrote in message news:K5adnROA_vuv8fHZRVn-pw@giganews.com... >i am trying to make a pressure meter. i am using matlab for it. microphone > port is already engaged for microphone based pressure sensor. I have made > a LVDT for sensing the high pressure. I want to connect the...

matlab output question
Hi, I have a matlab question: Suppose I want to output to a file with the following format: "190" r2pos "219" "193" r2pos "220" "202" r2pos "203" "205" r2pos "216" "207" r2pos "226" "229" r2pos "230" "236" r2pos "237" The two columns of numbers are recorded in the variables x and y. I use fprintf but can not get the " symbol in the file. Does any body know how to do this? Thanks. Jane Hi, try this : x=190; y=219; fprintf('"%d" r2pos "%d"',x,y) J�r�me Thus spake <Jane>: > Hi, > I have a matlab question: > Suppose I want to output to a file with the following format: > > "190" r2pos "219" > "193" r2pos "220" > "202" r2pos "203" > "205" r2pos "216" > "207" r2pos "226" > "229" r2pos "230" > "236" r2pos "237" > The two columns of numbers are recorded in the variables x and y. I > use fprintf but can not get the " symbol in the file. Does any body > know how to do this? > > Thanks. > Jane Try: tmpl=['"' '%d' '"' ' r2pos "' '%d' '"\n' ]; fprintf(tmpl,[x; y]) /PB -- A: Because it messes up the ord...

RE: SYS$OUTPUT ?
No, the first executable statement is a PUT SKIP; I am using a rather old version of emacs, 19.22, not that it should matter, but my guess is that emacs is interpreting the null byte as end of file. I tried this on a current version of emacs on Linux and no problem. In fact the first two statements in the program are PUT SKIP; PUT SKIP LIST ('BENCHMARK 1 - TWO AND THREE DIMENSIONAL SLOW VECTOR', ' DOT PRODUCT - VAX PL/I DEC'); so I don't see where the null byte is coming from. Maybe the skip is inserting the null byte, will have to test that. HERMES> create null.pli test: proc options(main); put skip; put skip list('This is a Test'); end test; Exit HERMES> pli null HERMES> link null HERMES> run null This is a Test HERMES> I guess that wasn't it. HERMES> create null.com $ SET VERIFY $ define sys$output null.log $ SHOW TIME $ run null Exit HERMES> @null $ SET VERIFY $ define sys$output null.log HERMES> dump/hex null.log 00454D49 5420574F 48532024 8D01000D ....$ SHOW TIME. 000000 3030322D 4E414A2D 37202020 8D010018 .... 7-JAN-200 000010 20248D01 000C3732 3A33313A 36302034 4 06:13:27....$ 000020 00010002 00010002 6C6C756E 206E7572 run null........ 000030 65542061 20736920 73696854 00010011 ....This is a Te 000040 00000000 00000000 0000FFFF 00207473 st ............. 000050 00000000 00000000 00000000 00000000 ................ 000060 so after the command line there are so...

Midpoint of a line, Thirdpoint of line, Quarterpoint of line
Dear Matlab community, For some reason I am having difficulty formulating the points that divide a line segment into thirds and fourths. The midpoint is easy, just the (mean([x1,x2]),mean([y1,y2])), but for some reason my mind is blanking on the others. Please help point me in the right direction. I will do the rest. Thanks in advance. Eric Nevermind...figured it out. sorry to bother, I was just having a lapse in my thinking. ...

Passing array to a fit function which is being fitted with the function FIT
Hi, my question is: Is there some way of passing arrays to the fit- function? If so how? For those interested in why I need this, read on... I'm using the FIT function of MATLAB to fit a rather intricate function to measured data. The function uses diffraction integrals which are approximated, and then used to calculated the electric field and it's intensity, which is then fitted. Due to the nature of the diffraction integrals, the function is actually a function of the detector coordinates and the object coordinates. Since the electric field at a point of the detector is the sum over all the points in object coordinates (with of course mathematical operations on them), I need to pass these also to the fit- function. So that basically I end up with having to pass the object coordinates in an array as a problem parameter and using the detector coordinates as the predictor. When I do this I get the error: ??? Error using ==> fittype.fittype at 420 Expression fitfunc_simul_gaussian_static (L_norm,x_norm,xp,xpshift,d,sig,r,z,diffdelta,kwave,E0,sigma_factor) is not a valid MATLAB expression, has non-scalar coefficients, or cannot be evaluated: But loading the coordinates directly inside the fit-function (which is really ugly coding) everything works as expected. So I end up with the above stated question: Is there some way of passing arrays to the fit-function? If so how? Hope someone can help me out. Thanks in advance, Michael Doesn't anyone have any idea/comm...

Questions about matlab curve fitting
Hello all=EF=BC=9A I have written a matlab curve fitting program=EF=BC=9A clc clear xx =3D 1:1:20; xx =3D xx'; yy =3D exp(xx); hold on; plot(xx,yy,'o'); start =3D [1 1 1]; s =3D fitoptions('Method','NonlinearLeastSquares',... 'Lower',[-Inf,-Inf,-Inf],... 'Upper',[Inf,Inf,Inf],... 'Startpoint',start); f =3D fittype('a*x^b+c','options',s); [coe,gof] =3D fit(xx,yy,f); coe gof plot(coe,'r'); grid on; the fitting result is not satisfied=EF=BC=9A General model: coe(x) =3D a*x^b+c Coefficients (with 95% confidence bounds): a =3D 2.035 (-6885, 6889) b =3D 4.595 (-1139, 1148) c =3D 1.006 (-8.515e+07, 8.515e+07) gof =3D sse: 2.6959e+17 rsquare: -0.1105 dfe: 17 adjrsquare: -0.2411 rmse: 1.2593e+08 Then I use the curve fitting tool in matlab toolbox to fit the same array. The result is just fine: General model Power2: f(x) =3D a*x^b+c Coefficients (with 95% confidence bounds): a =3D 5.2e-17 (1.568e-17, 8.832e-17) b =3D 19.19 (18.96, 19.43) c =3D 0 (-6.271e+05, 6.271e+05) Goodness of fit: SSE: 2.398e+13 R-square: 0.9999 Adjusted R-square: 0.9999 RMSE: 1.188e+06 I guss the problem comes from the StartPoint setting, because when I set the StartPoint as [5.2e-17 19.19 0], my program can also get a fine result. Here are the source code ge...

Sys Exec
I am using the System Exec.vi to send a command line to the windows command prompt: &nbsp; "command.com /c w32tm.exe /resync" &nbsp; I use this to force my PC to update the system time with a time server. When I run this command in the command prompt outside labview I get an output when the process completes that says "The command completed successfully.". &nbsp; I want to be able to display this message in LabVIEW - however when I wire a string indicator to the "standard output" terminal of the VI I don't get any feedback. Is this possible using this method? Or am I better off reading the return code to establish if the task completed? Return code doesn't seem to do anything either. It would be nice to know whether the process worked or not. &nbsp; &nbsp; W32tm.exe info: &nbsp; <a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/time_w32tm.mspx?mfr=true" target="_blank">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/time_w32tm.mspx?mfr=true</a> Message Edited by russelldav on 11-26-2007 02:51 PM resync.jpg: http://forums.ni.com/attachments/ni/170/286418/1/resync.jpg I just worked out how to fix this and get the output I wanted... I changed the command line to: "w32tm.exe /resync" and it works fine.&nbsp; I'm hazarding a guess the /c before was causing the problem? &nbsp; Does anyone know wh...

redirect output of matlab executable
I am looking to make a matlab executable that I can call from another simulation program. The matlab executable has to be able to return values to the program that is calling it. The only reference I can find to this is in the "compiler tips" documentation. It reads: You cannot return back values from your standalone application to the user. The only way to return values from compiled code is to either display it on the screen or store it in a file. To display your data on the screen, you either need to unsuppress (do not use semicolons) the commands whose results yield data you want to return to the screen or, use the disp command to display the value. You can then redirect these outputs to other applications using output redirection (> operator) or pipes (only on UNIX systems). What would the syntax be for using these statements when using matlab on a linux machine? Since I have not implemented this yet, if I call disp but then pipe it somewhere else, is it literally going to try to write a display? If so, then I need another solution, as the code that is calling my matlab executable is going to be calling it thousands of times. Please help Steven Lord, or other sage of matlab! OK, let me try again. I want to disp a variable and pipe it somewhere else on a unix system. The compiler tips suggest this is possible, but disp(x);unix('|temp.txt') disp(x)!|temp.txt And many other commands all give errors. Does anyone know how to do this? I would ...

complex output from matlab IFFT
Why am i getting complex output when i compute the inverse fft of a vector of complex numbers? This does not happen always and the imaginary part of the output is very small compared to the real part. thanks for any insight jeremy ok this is really dumb...i will reply to myself! rounding errors contribute to this, should take real(ifft(s)) or abs(ifft(s)), i think there is not much difference since imaginary parts are really small. jeremy jeremyscerri@gmail.com schrieb: > ok this is really dumb...i will reply to myself! Don't worry, I sometimes do that as well. Often just asking the question out loud is enough to find the answer. > rounding errors contribute to this, should take real(ifft(s)) or > abs(ifft(s)), i think there is not much difference since imaginary > parts are really small. In your original post, you wrote that the IFFT of a complex vector gave you a complex vector. In general, that is perfectly valid. You can only expect a real-valued output if the frequency domain vector has Hermitian symmetry. In that case, just discard the imaginary IFFT output - don't take the absolute of the IFFT, as the real output could become negative (you'd lose that information in the abs() routine). Regards, Andor > > jeremy 10x for highlighting the difference bweteeen the real() and abs(). As for the Hermitian symmetry property, i never heard of this, if you could elaborate more or point out some links, would be gratefull. jeremy <...

Soft Output Sphere Decoder
Hello, Has anybody encountered use of norms (L1, Linf) instead of L2, i implementing soft output sphere decoder (SD)? I know that it has been use in implementing hard output. you help will be greatly appreciated. thanks _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ? On Jun 4, 8:18 am, "pankajb" <mahajanpan...@yahoo.com> wrote: > Hello, > Has anybody encountered use of norms (L1, Linf) instead of L2, in > implementing soft output sphere decoder (SD)? I know that it has been used > in implementing hard output. you help will be greatly appreciated. > thanks > > _____________________________________ > Do you know a company who employs DSP engineers? > Is it already listed athttp://dsprelated.com/employers.php? L1 is not a bad approximation of L2 in some (small angle) regime, so this is often used in fixed-point implementation if one wants to avoid the use of multipliers. Linf is also not a bad approximation of L2 depending on the signal-to-noise ratio, and the input distribution. Julius >On Jun 4, 8:18 am, "pankajb" <mahajanpan...@yahoo.com> wrote: >> Hello, >> Has anybody encountered use of norms (L1, Linf) instead of L2, in >> implementing soft output sphere decoder (SD)? I know that it has bee used >> in implementing hard output. you help will be greatly appreciated. >&g...

fit transfer function in matlab
Hello, is there a way to fit a transfer function in matlab? thx Nadine In article <cl3cel$dv6$1@piggy.rz.tu-ilmenau.de>, cavemanX@gmx.de says... > Hello, > > is there a way to fit a transfer function in matlab? > > thx > > Nadine > > > What are you trying to fit - measured data? > What are you trying to fit - measured data? I have build up a tranfer function out of measured data and want to have a model of this, so that I can use it in Matlab. So I want to fit a tf into my measured tf. Nadine In article <cl3ebk$jte$1@piggy.rz.tu-ilmenau.de>, cavemanX@gmx.de says... > > What are you trying to fit - measured data? > > I have build up a tranfer function out of measured data and want to have a > model of this, so that I can use it in Matlab. So I want to fit a tf into my > measured tf. > > Nadine > > > is the data in the time or frequency domain? If it's in the frequency domain, you might look at YULEWALK in the Signal Processing Toolbox. If you have system input and output data, then you have several choices in the System Identification Toolbox. --Loren ...

how can i output line as an image ?
i need to write a M-file , and the functions inside are supposed to display as a image. which means (assume background image is img=zeros(100,100,3)), when i declare two points, there will be a line connects the points and appear on the image. "zuobian xiao" <1014625477@qq.com> wrote in message <j5udii$bk1$1@newscl01ah.mathworks.com>... > i need to write a M-file , and the functions inside are supposed to display as a image. which means (assume background image is img=zeros(100,100,3)), when i declare two points, there will be a line connects the points and appear on the image. plot the line as you normally would, then use getframe(gca) to get the imagedata including the line, and use imwrite to save it as a new image file. ...

Show best fit working
Hi, I'm studing "Licenciuatura en Informatica" at "UNPSJB" in Trelew, Argentina. My OS professors asked me to modify minix's mm in order to get "best fit" allocation algorithm instead of "first fit". It was quite easy to do so, we only modified alloc() in /usr/src/mm/alloc.c, but there's a problem; we must show that "best fit" is implemented. We tried to implement a syscall to get mm's hole list info. Since a syscall can't be trated as a serial comunication we divided it in two calls, the first one tell how many holes mm know, and the second sends back the specific hole info, as base and length. Acctaully there's another sytem call that changes between best fit and fisrt fit allocation mode. We found a couple of pages showing how to implement a syscall in minix, they show how to alter the minix mm or fs and the user space code. Well, we have a big trouble since we are runnung out of time and our modificaion refuses to work, basically when we try to retrive holes, and mm executes do_counth, a memory faoult is thrown :-( 142 Directories 0 Block special files 0 Character special files 4508 Free inodes 0 Named pipes 0 Symbolic links 23722 Free zones /dev/c0d0p2 is read-write mounted on /usr Multiuser startup in progress. Starting daemons: update cron. Minix Release 2 Version 0.4 bochs-minix.local.net login: root # cd /usr/src/mlibs/ # ....

bessel function best fit
Hi all, &nbsp; Quite new to LabVIEW. I am capturing diffraction images that are described by Bessel J functions. The maxima of the diffraction correspond to the maxima of the Bessel J functions ( or zeros of 1st derivative).&nbsp; I wish to fit the diffraction image intensities to a Bessel J function , pixel value -&gt; best fit to x in J(x). Has anyone previously done this before? I know the order n of the Bessel function but not necessarilly the pixel where x=0. &nbsp; Similarly, I hope to fit the diffraction image of a pinhole which is an Airy Disk to use as calibration ie pixel -&gt; m^-1. &nbsp; Any help or suggestions would be gratefully accepted. &nbsp; Regards, &nbsp; Leeser&nbsp; Don't think I attached files previously....! schematic.jpg: http://forums.ni.com/attachments/ni/170/240941/1/schematic.jpg open.jpg: http://forums.ni.com/attachments/ni/170/240941/2/open.jpg Hi Rob, Thanks for your help in this. That's basically what I'm looking for, matching diff pattern maxima with Bessel Function maxima. The saturation is caused by the apparatus but can't really be removed easily. It consists of a collimated diode laser (1mm diameter)&nbsp; impinging on the coil (sub milimetre dimensions). The diffraction pattern is then imaged onto the ccd. I have tried to develop a beam stop to prevent the zero order (effectively the laser beam) striking the ccd chip, but this causes more scatter and blocks part of the diff p...

Best Fit Spherical Harmonics
Hello Guys, I have globally sparse data (Longitude, Latitude, DataValue) and I'd like to compute the best fit of those using spherical harmonics. Is there any code / example somewhere to do so? Thanks for any help. G. The truncated Fourier fit to a function is also the least-squares fit. I have successfully done a spherical harmonic expansion with up to l=5 or so with all the associated m's this way. So, just use Fit. As usual with this sort of thing, noisy data can mess things up. Kevin On 7/30/2012 3:49 AM, George wrote: > Hello Guys, > > I have globally sparse data (Longitude, Latitude, DataValue) and I'd like to compute the best fit of those using spherical harmonics. Is there any code / example somewhere to do so? > > Thanks for any help. > > G. > ...

reading a file line by line and using the line in another script
Hi I am reading the file line by line and assgning it to the variable this variable used in another script called deploy_3.ksh. I am able do that just for the first line. My file consists of three lines for the other to lines an error occurs Found line: amireddy@baja.iso.ksu.edu:/home/baja/amireddy I00020133: 'test.txt' copied into the directory:'/home/baja/amireddy' on the machine 'baja.iso.ksu.edu' E03020134: Warning: No xauth data; using fake authentication data for X11 forwarding. E03020134: Warning: No xauth data; using fake authentication data for X11 forwarding. I00020133: ===================================================================== while read line do echo "Found line: $line" dest_dir=&line ## We call deploy3 to copy the file to the ## destination directory found in the file .. ${HARVEST_SCRIPTS}/deploy_3.ksh "${environment}" "${state}" "$ {viewpath}" "${item}" done< $dest_dir1 nitesh.reddy@gmail.com wrote: > Hi I am reading the file line by line and assgning it to the variable > this variable used in another script called deploy_3.ksh. > I am able do that just for the first line. My file consists of three > lines > for the other to lines an error occurs > > Found line: amireddy@baja.iso.ksu.edu:/home/baja/amireddy > I00020133: 'test.txt' copied into the directory:'/home/baja/amireddy' > on the machine 'baja.iso.ksu.edu' &g...

how to output multiple sample in usb6008 with matlab
hi i need your help to use ni usb6008 to output analog signal , the analog signal is the control signal from PID controller i used this code % Initialization global Temperature global Irradiance global current global Vref global data global u %%get connected devices d = daq.getDevices %create session s = daq.createSession('ni') s1= daq.createSession('ni') %add analog channel s.addAnalogInputChannel('ID',channel num, 'measurement type') % s.addAnalogInputChannel('Dev1',0:3, 'Voltage')%irradiance s.addAnalogInputChannel('Dev1','ai0', 'Voltage')%irradiance s.addAnalogInputChannel('Dev1','ai1', 'Voltage')%Temperature % s.addAnalogInputChannel('Dev1','ai3', 'Voltage')%Temperature s1.addAnalogOutputChannel('Dev1', 'ao0', 'Voltage') % set rate of scan 1000 scans/second , run for 30 seconds s.Rate=1000; s.DurationInSeconds =10 v.TerminalConfig = ' Differential'; %v.TerminalConfig = ' SingleEnded'; %_____________________________ %% %aquire data and process lh = s.addlistener('DataAvailable', @plotData); %store data %h = s.addlistener('DataAvailable', @storedata)% Analog Output ao_value = u % duty cycle control signal s1.outputSingleScan(ao_value) s.startBackground() s.wait() delete (lh) delete (h) s.release() but an error message appeared "The data argument must...

several output arguments... Stupid matlab... :-)
Hi, I've often wanted to do this: -------------------------------- currentBox=rand(1,6) currentBox = 0.4970 0.6096 0.0778 0.2414 0.0258 0.8465 K>> [xl(1:2) yl(1:2) zl(1:2)] = currentBox ??? Too many output arguments. -------------------------------- At least the last line I try to do... Why is matlab so stupid, that it doesn't understand that line? Let's try another thing then, to make it clear to matlab, what is is, that we're trying to do now: -------------------------------- K>> [xl(1:2) yl(1:2) zl(1:2)] = currentBox(1:6) ??? Indexing cannot yield multiple results. -------------------------------- OMFG... Is it just me or wouldn't this be neat? I cannot understand that mathworks doesn't implement these neat oneliners... ??? Or am I totally wrong at it? Please explain what you think. I keep on trying to do this. Instead I often have to divide this up into 3 lines/statements... On Oct 28, 8:58=A0pm, someone <newsbo...@gmail.com> wrote: > Hi, > > I've often wanted to do this: > -------------------------------- > currentBox=3Drand(1,6) > > currentBox =3D > > =A0 =A0 =A00.4970 =A0 =A00.6096 =A0 =A00.0778 =A0 =A00.2414 =A0 =A00.0258= =A0 =A00.8465 > > K>> [xl(1:2) yl(1:2) zl(1:2)] =3D currentBox > ??? Too many output arguments. > -------------------------------- > > At least the last line I try to do... Why is matl...

output value to command line from LabView?
Greetings, &nbsp; What is easiest way to return a string (code + message) from LabView to a windows command line?&nbsp; CIN? dll?&nbsp; If I need to create a dll (or lsb file for CIN), can I use Cygwin or Mingw?&nbsp; I would rather not purchase a separate compiler merely to return a value/string from an executable.&nbsp; Any thoughts and possible examples would be most welcome.&nbsp; &nbsp; Cheers, Justin Thanks for the suggestions Jarrod.&nbsp; I came up with similar ideas for a work around.&nbsp; The application requirements just changed and I will not have to include this functionality.&nbsp; However, if you do come across a good way to accomplish this, I would be interested. &nbsp; Cheers, Justin ...

matlab 2012a notes on-line now
fyi; just saw that mathworks now have 2012a release news on its web site http://www.mathworks.com/products/matlab/ --Nasser What a disappointing release! "Nasser M. Abbasi" <nma@12000.org> wrote in message <jiq9dn$o7v$1@speranza.aioe.org>... > > fyi; > > just saw that mathworks now have 2012a release news on its web site > > http://www.mathworks.com/products/matlab/ > > --Nasser ...

Web resources about - Outputting lines of best fit - comp.soft-sys.matlab

Outputting text on a paper tape machine
Back before the days of 8 inch floppy disks, storing computer programs was much more primitive than even a stack of punch cards. The earliest ...

Cablevision to simplify outputting video from your PC to your TV
A number of cable companies are trying to bring their content to the web these days in an effort to stay relevant in a world where video-streaming ...

Tricking the BeagleBone into outputting video
[FlorianH] wanted to get video out working with his BeagleBone but he just couldn’t figure out how to make the kernel play ball. Then a bit of ...

Resources last updated: 3/30/2016 4:44:41 PM