COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Orthogonal Projection onto 1D Subspace

• Email
• Follow

```Hey,

I know how to project a point orthogonally using least squares onto a line as long as the line passes through the origin, but what if the subspace has a y-intercept other than zero?

For example, the point x=(5,6) can be projected orthogonally onto the line spanned by the point (1,2) by solving y=V*pseudoV*x where V=[1;2] but this basis goes through the origin. What if the basis DOES NOT go through the origin?

Thanks
```
 0

See related articles to this posting

```"GeoGraphic " <blazingfury31@yahoo.com> wrote in message <hfc4qe\$e4t\$1@fred.mathworks.com>...
> Hey,
>
> I know how to project a point orthogonally using least squares onto a line as long as the line passes through the origin, but what if the subspace has a y-intercept other than zero?
>
> For example, the point x=(5,6) can be projected orthogonally onto the line spanned by the point (1,2) by solving y=V*pseudoV*x where V=[1;2] but this basis goes through the origin. What if the basis DOES NOT go through the origin?

Pretend it does goes through the origin, project as usual, then add in the displacement from the origin.
```
 0

```"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hfc7go\$sr5\$1@fred.mathworks.com>...

> Pretend it does goes through the origin, project as usual, then add in the displacement from the origin.

I'll try that one again...

Let x0 be a point on the line. Then the projection should be

x=dot(y-x0,V/norm(V))*V+x0
```
 0

```Whats the result ?

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hfc81j\$1na\$1@fred.mathworks.com>...
> "Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hfc7go\$sr5\$1@fred.mathworks.com>...
>
> > Pretend it does goes through the origin, project as usual, then add in the displacement from the origin.
>
> I'll try that one again...
>
> Let x0 be a point on the line. Then the projection should be
>
> x=dot(y-x0,V/norm(V))*V+x0
```
 0

```Can you tell me the code to do orthogonal projection on n dimensional subspace ?

thanks

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hfc81j\$1na\$1@fred.mathworks.com>...
> "Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hfc7go\$sr5\$1@fred.mathworks.com>...
>
> > Pretend it does goes through the origin, project as usual, then add in the displacement from the origin.
>
> I'll try that one again...
>
> Let x0 be a point on the line. Then the projection should be
>
> x=dot(y-x0,V/norm(V))*V+x0
```
 0

4 Replies
348 Views

Similar Articles

11/30/2013 9:18:40 AM
page loaded in 97330 ms. (0)

Similar Artilces:

going onto a new line
ok i am quite new to ruby and i am only 14 so.... any way i am struggling to get my test to go onto a new line here is the code i put in (if you could copy and paste the code then make the changes in the reply that would be great): print("**uh.....**") sleep 1.5 print("**were am I?**") -- Posted via http://www.ruby-forum.com/. > =A0 =A0 print("**uh.....**") print "**uh.....**\n" or puts "**uh.....**" note, parens may not be needed here.. best regards -botp Excerpts from Dan L.'s message of Sun Jan 30 03:06:24 +0100 2011: > ok i am quite new to ruby and i am only 14 so.... any way i am > struggling to get my test to go onto a new line here is the code i put > in (if you could copy and paste the code then make the changes in the > reply that would be great): > print("**uh.....**") > sleep 1.5 > print("**were am I?**") > There are many ways. The most simple is this: print "ath " print "ath " This will use the new line character from the source file. However usually you use string

Dragging JInternalFrame onto JTree?
I'd like to be able to drag an internal frame off of a JDesktop onto a JTree. Would I call setDragEnabled() on the JDesktopPane or the JInternalFrame? Any other gotchas to worry about? Thanks, Laird On Jul 30, 2:32 pm, Laird Nelson <ljnel...@gmail.com> wrote: > Would I call setDragEnabled() on the JDesktopPane or the > JInternalFrame? Any other gotchas to worry about? My, what a stupid post I made. My apologies; there is no such method. Carry on. Laird On Jul 30, 3:10 pm, Laird Nelson <ljnel...@gmail.com> wrote: > My, what a stupid post I made. My apologies; there is no such > method. Carry on. Let's try once more. I know that there is not a setDragEnabled() method now; that's only on commonly draggable components (like JTree etc.). I had been laboring under the silly delusion that it was on all JComponents. All better now. I also know about TransferHandlers and Transferables and all of that, having done drag and drop before from trees to tables and so forth. Onwards. I have an odd case where I need--well, would like--to be able to drag an internal frame onto a JTree node. More specifically, I'd like it to be the case

drawing shapes onto avi?
Hello, Movie processing question: I am interested in outlining shapes on frames of an avi, and then writing these shapes over top of the frames of another avi. Any recommendations for programs? Thanks, Andrew > Any recommendations for programs? Adobe AfterEffects Pluton

Buttons onto JTabbedPane?
I am trying to make JTabbedPane as what IDEs have; a tabbed panel with buttons I mean I try to make JTabbedPane as [Button] [Tab 1] [Tab 2] ... [Tab x] [Button] It does not have to be Button, but anything (such as JPanel) since I can edit it. Do you have any idea or piece of codes? Thank you >I am trying to make JTabbedPane as what IDEs have; a tabbed panel with > buttons > I mean I try to make JTabbedPane as > > [Button] [Tab 1] [Tab 2] ... [Tab x] [Button] > > It does not have to be Button, but anything (such as JPanel) since I > can edit it. > Do you have any

Overlaying a rectangle onto an image
I'm trying to replicate something in javascript which is generally done using some realtime image-manipulation tools and cgi. I want to overlay an arbitrarily-sized rectangle onto a thumbnail image. You can see an example of the effect using cgi here: http://tinyurl.com/4mapk I found a couple of examples at FAQTs of using clipping to overlay opaque rectangles, but my rectangles need to be completely transparent but with a one- or two-pixel wide red border, just like you see in the example image. Of course another technique might be to copy that small rectangular portion of the image onto itself, with a red border around it--I don't know how to do that either. I've seen some pretty impressive sites some time ago that did interesting things with translucent rectangles overlayed on top of an image, but I can't seem to find them anymore no moatter how much I scour the web. Can anybody give me some tips on how to proceed, or sites that do what I want which I can dissect, or even some working code? Thanks everybody! Arvin my mail address: flipomatic 'at' eudoramail 'dot' com Arvin Portlock wrote: > I'm trying to replicate something

Backup onto DVD
Hi, I would like to have the following backup system. What are your recommendations (open source or closed source) ? Does this make any sense at all ? I want to backup every night my server's data onto DVDs. I have about 40-100 MB of new data per day. I have the following requirements: - I want to reuse the DVD until it is full - When the DVD is full, I want the tray to open and the backup process to resume when I insert a new disc (probably the following morning). - I want to do incremental backups in the following way: * full backup every 4 or 8 weeks (e.g. every 4th sunday) * backup from previous full backup every week (e.g. sunday) * backup from previous day the remaining days. This way my maximum incremental chain is 7. Thanks for your time & help.

drag and drop onto exe
hi... i have a program that opens a couple files and performs some operations on them. i wanted to modify my program so that if you drag and drop a file onto the exe via windows, it will open this file and use it instead. however, without even modifying my code first, if i drag and drop a file onto the exe it no longer opens/writes to the files specified by the program. but when no file is dragged onto it, it runs fine as normal. now i assumed that when you drag a file onto the exe it just passes in an extra parameter.. i dont understand why this should modify the way the program is run. any explanation? Mark wrote: > i have a program that opens a couple files and performs some operations > on them. > i wanted to modify my program so that if you drag and drop a file onto > the exe via windows, it will open this file and use it instead. > > however, without even modifying my code first, if i drag and drop a > file onto the exe it no longer opens/writes to the files specified by > the program. but when no file is dragged onto it, it runs fine as > normal. > > now i assumed that when you drag a file onto the exe it just passes in > an extra

Latching onto open web windows
will deliver subsequent call data (ie when call is answered) and this data should be passed to the same database record. That is fine because we can do a search for the required record via a web URL. But what if a web page is open on that record on the client. Using Java can we latch onto that web page, interrogate the page to see what record it is (maybe via a form text box?) and then perhaps save the record (How?) and then close the web page (How?). It is the B) bit that troubles me most. Is JavaScript a possible solution to any of this? Is this possible? how? Angus On Tue, 06 Mar... search url and simply posting to the web server. > > > B) Achieving A) I suppose should be doable but a requirement is that > the server will deliver subsequent call data (ie when call is > answered) and this data should be passed to the same database record. > That is fine because we can do a search for the required record via a > web URL. But what if a web page is open on that record on the > client. Using Java can we latch onto that web page, interrogate the > page to see what record it is (maybe via a form text box?) and then > perhaps save the record (How

Trouble burning playlist onto discs
I have been burning playlists on CDs with this G4 since I bought it several years ago. Recently, I have encountered a new problem. When I burn a playlist onto a CD, iTunes sort of freezes during the 'finishing' process. I once let it run for 3+ hours only to have to force quit and force restart. The music does show up on the disk, but only as an audio file, with no titles. I have tossed 4 perfectly good CDs out because of this. Can anyone help? In article <1112798889.961204.171330@g14g2000cwa.googlegroups.com>, "Emily" <emilyrkessler@mac.com> wrote: > I have been burning playlists on CDs with this G4 since I bought it > several years ago. Recently, I have encountered a new problem. When I > burn a playlist onto a CD, iTunes sort of freezes during the > 'finishing' process. I once let it run for 3+ hours only to have to > force quit and force restart. The music does show up on the disk, but > only as an audio file, with no titles. > > I have tossed 4 perfectly good CDs out because of this. Can anyone > help? Are there any errors in the console log? Did you try repairing permissions? In article <

Problems coping podcasts onto shuffle
Until recently, I used to be able to copy podcasts to my shuffle by simply creating a separate playlist (by genre or by copying individual mp3 files into it). However, ever since I updated the iTunes software, I have not been able to successfully copy podcasts onto my shuffle. I've exasperated myself trying to understand why iTunes refuses to copy these files onto the shuffle. (I've tried everything I can think off, limiting my library to podcasts, creating new playlists, static or otherwise identified via genre's) Here are the versions the iTunes software and iPod updater software which I have on my machine. Mac OS X 10.3.9 iTunes 6.0 iPod Updater : 1.1.2 I'm finally able to copy files by dragging individual files into the iPod icon (on the left hand side). But I'm not sure this is the best way to do so. Does anyone have any pointers explaining whats going on ? Any help towards fixing this problem would be appreciated. Vikram

Masking with PlgBlt() onto Postscript PrinterDC
I'm trying to print bitmap images using PlgBlt win32 api. This works for most printers. However, when I try this onto a postscript printer (actually using drivers to prn file), it seems not working. I confirmed producing two prn files once by PlgBlt(..., &memDC, ..., maskbm, ... ) and later by BitBlt(..., &memDC, ...) .. Two results prn files differed only by creation time line. It looks like, the postscript driver is not able to convert PlgBlt properly. Has anyone tried something similar to this? Could I have done something wrong in my code? Or is the postscript unable to interpret PlgBlt in principle? I know there's 'imagemask' command in postscript language which should be used very similar to PlgBlt masking capability. If PS drivers are unable, what alternative mean could I try to realize my goal? Thanks in advance. -- Daewon On Feb 15, 8:17=A0pm, thoward37 <thowar...@gmail.com> wrote: > On Feb 12, 11:41=A0pm, TheOne <daewon.y...@gmail.com> wrote: > > > > > > > I'm trying to print bitmap images using PlgBlt win32 api. This works > > for most printers. However, when I try this onto a postscript

pushing element onto beginning of an array?
Hello all - What's the best way to put an element onto the beginning of an array? Currently the method I'm using is \$data = array_merge( array("new first value"), \$data ); Is there a better way? lawpoop@gmail.com wrote: > What's the best way to put an element onto the beginning of an array? Use the array_shift/unshift/push/pop family of functions. -- ---------------------------------- Iv�n S�nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- MSN:i_eat_s_p_a_m_for_breakfast@hotmail.com Jabber:ivansanchez@jabber.org ; ivansanchez@kdetalk.net On Mar 11, 9:10 am, Iv=E1n S=E1nchez Ortega <ivansanchez-...@rroba- escomposlinux.-.punto.-.org> wrote: > lawp...@gmail.com wrote: > > What's the best way to put an element onto the beginning of an array? > > Use the array_shift/unshift/push/pop family of functions. > Thanks, Ivan. It looks like the function I want is array_unshift() .

projecting disc onto coordinate axes
Got disc with center in origin and radius r. Disc plane has normalized normal vector (nx, ny, nz). Now, how to calculate disc projections onto coordinate axes (ultimate goal here is to calculate disc bounding box)? Thanks. Sagrailo CG <sagrailo@yahoo.com> wrote: : Got disc with center in origin and radius r. Disc plane has : normalized normal vector (nx, ny, nz). Now, how to calculate disc : projections onto coordinate axes (ultimate goal here is to calculate : disc bounding box)? I take it nx = n*cos(theta_x) where n is the unit normal and theta_x is the angle between n... and radius r. Disc plane has > : normalized normal vector (nx, ny, nz). Now, how to calculate disc > : projections onto coordinate axes (ultimate goal here is to calculate > : disc bounding box)? > > I take it nx = n*cos(theta_x) where n is the unit normal and theta_x > is the angle between n and the x-axis. Then there'd be a vector of > length r in the plane of the disc that makes an angle 90-theta_x > with the x-axis. And cos(90-theta_x) = sin(theta_x) = sqrt(1-nx^2). > So the projection of the disc on the x-axis would be r*sqrt(1-nx^2), > and the x

Backing up onto multiple CDs
Hello, I have a few gigs of Vorbis files I'm trying to back up to CDs, arranged in a nice directory tree by genre, artist, and album. I could manually add enough directories to fill a CD to each CD, but I'm looking for a way to automate this. Some of the backup programs I've seen use .tar files, or worse, .tar.gz files. Since the data is already compressed, I'd rather avoid this. Also, it would be nice to be able to use the CDs when I get a portable Vorbis player. I don't have large files I need split, and I'd prefer if the lowest-level directories weren't spli

Projecting SolidWorks points onto surfaces
Hello, I have been trying to do something and I am not sure that SolidWorks is capable of doing it. I have a text file with x y z coordinates of points. x and y have numerical values and z is always zero. (basiclly a 2D sketch on the xy plane) I have a macro that imports the points as a 2D or 3D sketch into a part. Now what I need to do is keep the x and y coordinates and project the points onto a surface to find out what the z coordinate is. I found a macro that can add a coincident relation between the points and the surface, but that also changes the x and y coordinates so it will not work. For example, lets say I have a point that has x=25 in, y= -45 in and z=0 in. If I project that point onto the surface, the new coordinates should be x=25 in, y=-45 in and z=30 in. I have not been able to find a way to do this other than putting points on the surface and manually changing the x and y coordinates to find out what the z coordinate is. I am really at a loss at this moment. We need to do this for hundreds, maybe thousands of points and manually it would be out of the question. I tried importing a curve from x y z coordinates, convert entities and then project that onto

Drawing a line onto a matlab image
Hiya, I need to draw a series of lines onto a matlab image. Is there a built in function where I can specify the start and end positions of the line? ..or am I going to have to implement some form of bresenhams line drawing algorithm. Thanks. Nick. figured it out after 3 hours..... doh..

How to install ACE onto QNX?
Hi, all: How to install and build ACE libraries onto QNX 6.2.1. Where can I find the detailed instructions? thanks James

Overlapping images onto single image
Hi, I was wondering if anyone had tried creating single bitmap image by combining 2 or more different bitmap images. I want to create a single image by overlaping image of an object on a background image. How can I do this using OpenGL or VC++ Thanks!! "sid" <sraina77@netscape.net> wrote in message news:47a4e3de.0409011844.4527e2ed@posting.google.com... > I was wondering if anyone had tried creating single bitmap image by > combining 2 or more different bitmap images. > > I want to create a single image by overlaping image of an object on a > background image

Importing data onto existing table
Good Evening, I'm just playing around in my oracle10g installation on AIX5.3. I have created 2 users named kimi and fred. Kimi owns the table kimi.f1_team fred owns the table fred.fred_f1_team Table strucure of kimi.f1_team and fred_f1_team is exactly the same. My intention is to populate fred.fred_f1_team table with kimi.f1_team data. But when I use imp utility it creates a new table fred.f1_team and loads it with data. Can you please help me to understand how to load existing table with data from some other table. Thanks, Sam "Sam Durai" <reachsamdurai@gmail.com> wr

getting back onto the TDS Survey GX card
Hi there, I recently purchased an hp 48gx with a survey gx card and 512 ram card on ebay, when i first turned it on i was already on the survey card and i scrolled through the menus easily. I exited out of the survey card and now i am having troubles getting back onto it. When i type TDS48 and hit enter i get the message " Installing Library....Failed. For installing, insert program card in port 2". Should i install the survey card in port 2 when it clearly say only to install it in port 1? I have already tried taking out the cards and batteries and left over night... is on the "default" block of 128KB of ROM when placed into card slot 1. This is also a security feature that would prevent piracy (to some degree), since you would need a RAM card larger than 128KB to copy the ROM card onto. Hope that long-winded answer didn't cause more confusion :-) On Nov 19, 8:51=A0am, Andy <goldnj...@hotmail.com> wrote: > Hi there, > > I recently purchased an hp 48gx with a survey gx card and 512 ram card > on ebay, when i first turned it on i was already on the survey card > and i scrolled through the menus easily. I exited