Least squares from file
hi i have a final project i have to write least squares best fit vi,vi should read the datas from a txt file and draw best fit line according to least squares method calculations and also it should show the datas in point form pls help to me i tried a lot but i got nothing...thx
Hey siktigit ys,
There are built in Least Square Fit functions in LabVIEW. Here is some information about them. If you are having trouble reading the data from the file, here is an example showing how to use the read and write VIs. In order to show your data in a graph, I'd just read the data from the text files into an array and display that array on an XY graph. That should be enough to get you started. If you need more help, just let me know and have a great weekend!
John B.
Embedded Networks R&D
National Instruments
Certified LabVIEW Developer
Similar Messages
-
Least squares method from file
hi i have a final project i have to write least squares best fit vi,vi should read the datas from a txt file and draw best fit line according to least squares method calculations and also it should show the datas in point form pls help to me i tried a lot but i got nothing...thx
Hi,
I recommend that you search the following websites for assistance:
www.ni.com
www.ni.com/community
Kareem W.
National Instruments
Web Product Manager -
Time Stamp format from file problem
Hey there,
I have a pretty peculiar problem. I'm working on two PCs right now, one is my private laptop running on Windows 8, and the other one the PC at my workplace, running on Windows XP, but on the same version of LabVIEW. I use this method to save the time and date to a tab delimited .txt file. Then later, with another VI, I read the date and time written to file to reconstruct the time stamp. I've noticed that dates written to file from my workplace differ from the dates written from my private PC: in Windows XP, there are "-" separating the day, month and year. In Windows 8, it's "/". There are other differences (see pictures). So naturally, when reading from file using my VI, I can only read on my private PC files (or at least dates) written on my private PC and vice versa, I can't read files written on my private PC on my workplace PC. Can anybody tell me why there's a difference in format, or how to write the date uniformly so I can read it on any PC, or how to read both formats?
So this is the method I use for writing the time and date (the subVI only inserts a certain number of TAB characters).
This is what it looks like on Windows 8
This is what it looks like on Windows XP
This is the VI (attached) I use to read the time stamps (the first row actually contains the time stamp in HH:MM: SS format for a whole bunch of measurements).
Have a nice day.
Solved!
Go to Solution.
Attachments:
Extract Time Stamps.vi 22 KBI would suggest using the ISO-8601 UTC format.
The only limitation is that the string value is in reference to GMT.
The conversion of the string back to a timestamp will present the date/time on your front panel indicator as local time.
https://lavag.org/topic/15034-timestamp-support-for-format-into-string-scan-variant-from-string-stri...
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
Least square circle calculation on a series of data points
I am taking a series of (x,y) part measurements that describe a circle (radius & rotation angle). The center of the part and center of rotation are offset. Looking for code to do a least square circle calculation on this data set so diameter and out-of-roundness can be estimated. Platform LabView 8.2.
Here is my simple solution from the above mentione thread:
(Is it not exaclty "least squares" in the classical sense but the sphere fit works typically very well..)
LabVIEW Champion . Do more with less code and in less time . -
I need to plot the Least Squares Regression Line (not just calculate its values with the LINEST function). Can anyone advise me on how to graph this line?
Grapher.app in OS X Utilities is excellent for that : entering data from Numbers Excel etc. into a Grapher "Point Set", plotting all your data, computing and plotting a regression curve linear or exponential or polynomial.
Unfortunately there is not a single word about point sets and regression in the Grapher Help.
So, suggest you download (free) "Instruction for Use - Grapher on web site
http://y.barois.free.fr/grapher/Documentation.html
and go to page 31 to 37, "Initiation > Lesson 6 : Treating a point set (Regression curve), and also page 68, "Appendix 1. Points sets : from speadsheets to Grapher".
If you try Grapher's regression curves, please tell us about the manual above : useful or not, too easy or difficult, readable or not etc.
Thank you.
YB24
PS. Documentation about Grapher is also here : Google "Apple Grapher" > http://en.wikipedia.org/wiki/Grapher > Article > Talk > Grapher 1.1 to 2.3 (French and English) (11th september 2012) -
Creating Poster from File function causes all graphics files to distort.
Sorry for the long subject title, didn't know how to pare it down...
What's happening is when I add 3D content in Acrobat 3D V8 I select the option in the Poster Image window to "Creat poster from file", the graphic ALWAYS rotates the image and often distorts it as well.
Any fix for this?
Jeff PerkinsI don't get this error. I've tried both JPG and BMP files, and both work. Hmmm...maybe it's due to the aspect ratio. Try at least matching the layout (portrait/landscape) between the 3D annot and the graphic file.
-
Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%
Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
1) while installing the rpm packages the following package gave an error
Error reading from file glibc-2.5-24.i686.rpm
2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
What could be the problem where do I find the error log if its created
Please help me
Thanks
Edited by: 891355 on Nov 6, 2011 12:06 PMI found the installActions file in the installer folder and I think this could be the problem
INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
though I am attaching the log file for more details do you think the installer is corrupt :(
InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
Edited by: 891355 on Nov 6, 2011 1:35 PM -
Cannot deploy process flow package specification from file
Hi,
we are using owb 11gr2 on linux. We successfully managed to deploy mappings and tables into a specification file, and then deploy from that file into the target database (RAC). But when we try to deploy a process flow package we run into an error:
A process flow package can be deployed to a specification file. But a deployment from that specification file fails with the error: " OMB05623: Cannot deploy specification from file. Exception follows. nulll"
### SETUP
set CONN_DESIGN "xxx"
set CONN_TARGET_DESIGN "yyy"
set CONN_TARGET_RT "xxx'"
set DIR "D:\\tmp"
set RELEASE "V0_2"
set file "$DIR\\$RELEASE"
set plan "FILE_DEPLOY_$RELEASE"
### Deployment via control center: works!
OMBCONNECT $CONN_DESIGN
OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
OMBCC '/KLINGEL_DWH'
OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan'
OMBDISCONNECT CONTROL_CENTER
OMBCOMMIT
OMBDISCONNECT
### Deployment via specificatin file: fails!
OMBCONNECT $CONN_DESIGN
OMBCONNECT CONTROL_CENTER $CONN_DESIGN
OMBCC '/KLINGEL_DWH'
OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$plan'
OMBALTER DEPLOYMENT_ACTION_PLAN '$plan' ADD ACTION 'PF_TEST' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE '/KLINGEL_DWH/WF_DWH/PF_TEST'
OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$plan' AS SPECIFICATION TO '$file.xml'
OMBDROP DEPLOYMENT_ACTION_PLAN '$plan'
OMBDISCONNECT CONTROL_CENTER
OMBCOMMIT
OMBDISCONNECT
OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
OMBDEPLOY SPECIFICATION FROM '$file.xml'
### OMB05623: Deployment von Spezifikation aus Datei nicht möglich. Exception folgt. null
###OMB05623: Cannot deploy specification from file. Exception follows. nullIf we use the operation DROP it works. But REPLACE and CREATE do not work.
We get the error regardless whether the code is executed as an expert or on the command line at a windows client.
Does anyone knows a workaround?
Deployment via a specification file is a must due to license and architecture requirements.
Thanks,
Carsten.Its woked fine for me for OWB 10.2.0.4 .... some steps are missing from code like
when you are connecting again it should be
OMBDISCONNECT
OMBCONNECT CONTROL_CENTER $CONN_TARGET_RT
OMBDISCONNECT
OMBCC '/KLINGEL_DWH'
OMBCONNECT CONTROL_CENTER $CONN_TARGET_RTI think you can try the same on different system .
Cheers
Nawneet -
HT1923 error reading from file
Error Raeding from file C:\Program File (x86)/common files\apple\coreFP\coreFP.dll. Werify that the file exists and that you can access it?
How do we repair this error?I found the installActions file in the installer folder and I think this could be the problem
INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
though I am attaching the log file for more details do you think the installer is corrupt :(
InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
Edited by: 891355 on Nov 6, 2011 1:35 PM -
Hi all
I'm trying to install SQL 2008 Express on my Computer: Hp compact DX7300 Slim tower.
and get this error:
TITLE: Microsoft SQL Server 2008 Setup
The following error has occurred:Error reading from file d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\msdbdata.mdf. Verify that the file exists and that you can access it.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0&EvtType=0xF45F6601%25401201%25401
Log file
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Exit code (Decimal): -2068643839
Exit facility code: 1203
Exit error code: 1
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Start time: 2014-12-09 23:22:03
End time: 2014-12-09 23:40:28
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\sql_engine_core_inst_Cpu32_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0
Machine Properties:
Machine name: VISTA-PC
Machine processor count: 2
OS version: Windows Vista
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered
Package properties:
Description: SQL Server Database Services 2008
SQLProductFamilyCode: {628F8F38-600E-493D-9946-F4178F20A8A9}
ProductName: SQL2008
Type: RTM
Version: 10
SPLevel: 0
Installation location: d:\8268cd7b247d294de359c9\x86\setup\
Installation edition: EXPRESS
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: False
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
ENABLERANU: True
ERRORREPORTING: False
FEATURES: SQLENGINE,REPLICATION
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: SQLExpress
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
MEDIASOURCE: d:\8268cd7b247d294de359c9\
NPENABLED: 0
PID: *****
QUIET: False
QUIETSIMPLE: False
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: VISTA-PC\VISTA
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: False
TCPENABLED: 0
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\SystemConfigurationCheck_Report.htm
I will very appriciate if someone can help me solve it. I was trying to set Full control for my account in Properties/Security of root folder and try again but error is still.
Many thanksHi Foreverduy,
Before you run SQL Server 2008 express setup, make sure that you have installed Windows installer 4.5 and.NET Framework 3.5 SP1 manually. For more information about the process, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx. Moreover, please turn off all the third-party softwares which could prohibit the installation process.
According to your error message, the issue could be due to that your account has no rights to install SQL Server, or the corruption on the media.
Firstly, please ensure that your account has admin rights. Also make sure that you right-click the setup.exe and choose “Run as administrator” to complete the installation.
Secondly, please check if "msdbdata.mdf" file exists at d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template. If it exists, please make sure that your account has read permission to the extracted
folder.
However, if the file doesn't exist in the extraction, the media could be corrupt. Please download the
media
again and check if the issue still occurs.
Regards,
Michelle Li -
some music files do not show up in google play music app library. I did clear cache/data and restarted phone. The music is stored on the SD card. Most of the music in the library is in the same folder on the sd card. I can play the song from file manager, but it still is not in the music library in play music.
Cyndi6858, help is here! We'd be happy to help figure this out. Just to be sure though, the Droid Maxx should not have an SD card. Is this the Droid Razr Maxx? How did you add the music to the device? Are you able to see the files and folders located on the SD card or device when plugged in?
Thanks,
MichelleH_VZW
Follow us on Twitter @VZWSupport -
Store \ Retrieve files from file system
Hi to all!
I would like to implement a solution for storing files uploaded via apex user interface to servers file system. As well I would like this files to be retrievable by apex users. I designed the following solution:
For upload:
1. Through file browse item user chooses file to be uploaded
2. File goes to custom table (as BLOB)
-- so far i would use apex Upload\Download files tutorial
3. File(BLOB) would then have to be written to file system to some directory and file id would have to be written to some db table which holds pointers to files on file system
4. delete file(blob) from custom table (from step 2)
For download:
1. user chooses link from some report region(based on table giving file pointers to files residing on file system)
2. file identified with chosen file pointer is then inserted into blob column of some custom table in db
3. from custom table with download procedure fie is finally presented to user
4. delete file(blob) from custom table (from step 2)
Using apex tutorial for Upload\Download files it is straitforward to get the files from db table or into db table using blobs. But i have not seen any example of using BFILE or migrating files from db to file system and vice versa.
So some Q arise:
a) How can I implement step 3 under For upload section above
b) How can I implement step 2 under For download section above
c) Is there any way to directly upload file to file system via apex user interface or to directly download file from file system via some report region link column?
Please help!!!
Regards Marinero
Message was edited by:
marineromarinero,
Here is a procedure that will copy an uploaded file to the file system:
Procedure BLOB_TO_FILE(p_file_name In Varchar2) Is
l_out_file UTL_FILE.file_type;
l_buffer Raw(32767);
l_amount Binary_Integer := 32767;
l_pos Integer := 1;
l_blob_len Integer;
p_data Blob;
file_name Varchar2(256);
Begin
For rec In (Select ID
From HTMLDB_APPLICATION_FILES
Where Name = p_file_name)
Loop
Select BLOB_CONTENT, filename Into p_data, file_name From HTMLDB_APPLICATION_FILES Where ID = rec.ID;
l_blob_len := DBMS_LOB.getlength(p_data);
l_out_file := UTL_FILE.fopen('UPDOWNFILES_DIR', file_name, 'wb', 32767);
While l_pos < l_blob_len
Loop
DBMS_LOB.Read(p_data, l_amount, l_pos, l_buffer);
If l_buffer Is Not Null Then
UTL_FILE.put_raw(l_out_file, l_buffer, True);
End If;
l_pos := l_pos + l_amount;
End Loop;
UTL_FILE.fclose(l_out_file);
End Loop;
Exception
When Others Then
If UTL_FILE.is_open(l_out_file) Then
UTL_FILE.fclose(l_out_file);
End If;
end; And here is a procedure that will download a file directly from the file system:
Procedure download_my_file(p_file In Number) As
v_length Number;
v_file_name Varchar2(2000);
Lob_loc Bfile;
Begin
Select file_name
Into v_file_name
From UpDownFiles F
Where File_id = p_file;
Lob_loc := bfilename('UPDOWNFILES_DIR', v_file_name);
v_length := dbms_lob.getlength(Lob_loc);
owa_util.mime_header('application/octet', False);
htp.p('Content-length: ' || v_length);
htp.p('Content-Disposition: attachment; filename="' || SUBSTR(v_file_name, INSTR(v_file_name, '/') + 1) || '"');
owa_util.http_header_close;
wpg_docload.download_file(Lob_loc);
End download_my_file;I could put a sample application on apex.oracle.com, but it wouldn't be able to access the file system on that server. -
Pick value from file in FOR loop
Hello All,
I was trying to delete records from database day by day and commit. Is it possible to pick the dates from file and then delete the database record for that day. Something like below.
For day IN <File.txt>
LOOP
delete from table where date = '<1st value from File.txt>';
commit;
END LOOP;
I have to do this from unix box, so i can place the file (with list of dates as input) in the path from where i am issuing sqlplus.
Please suggest any other way to delete it day by day is most welcome.
Thanks.982193 wrote:
Hello All,
I was trying to delete records from database day by day and commit. Is it possible to pick the dates from file and then delete the database record for that day. Something like below.You an use EXTERNAL TABLE (Or SQL Loader, if the file cannot be moved to the DB server) to read from a file and it can be used in your DELETE statements just as a normal table.
>
For day IN <File.txt>
LOOP
delete from table where date = '<1st value from File.txt>';
commit;
END LOOP;
LOOP is a bad idea.. You could do it in a single statement..
delete from table where date in (select the_date_coumn from the external_table);
And COMMIT inside LOOP is again not a good idea.. -
I am trying to create mp3 version of itune songs. I have gone through the preference sequence to be mp3 encoder but this is not having any effect. I have also tired from file tab to create a version but this is not available to action showing as lite grey.
Any help would be appreciatedI am trying to create mp3 version of itune songs. I have gone through the preference sequence to be mp3 encoder but this is not having any effect. I have also tired from file tab to create a version but this is not available to action showing as lite grey.
Any help would be appreciated -
Display image in reports 10g from file path saved in table
i have to show image on oracle reports 10, path is available in a table like "..\images\myimage.jpg" (here path exists on Application Server side)
how to pick this image and show on reports.
thanks & regards.
abidSet the property "Read from file" to Yes for the item in the datemodel, and additionally set the filetype to "Image" (also in the properties of the item)
Maybe you are looking for
-
Album release dates in "Album" view
Is there something wrong with the way I'm tagging my music in iTunes, or do you notice this too? In the iPod app, when you view all your music by Albums, some albums list the release date (for example, April 10, 2008), while other albums only list th
-
Hi experts. I recently install a Java Add-In on a BW 3.5 Server. After the installation I tried to apply a patch to the java stack but it gave me an error that i can't resolve. And now, after the unsuccessful attempt, I can't start my j2ee server. In
-
Dynamically changing the value in table control
Hello Every one, In MD61 transaction table control am trying to change value dynamicaly i.e am trying to change value in table control automaticaly tht value to be captured and i need to show in status bar... Ex table control field is number: am givi
-
Creating dynamic database connection (SQL server 2008) from Adf application
Hello, I am creating an ADF Fusion Application. I use Jdev. 11.1.2.3.0 , WebLogic 10.3 and MS SQL server 2008 database. My question is that how can I create a database connection configuration file, now I connect to the database through hard coding,
-
How to create composite field in crm 2013
Hi, I need 3 address fields in account entity in crm 2013 . By default 2 composite address fields are available i need 1 more composite address field. Can anyone tell me how to create custom composite address field like address1 and address2. Please