152 questions
0
votes
0
answers
13
views
Determine intersection point between orthogonal line and two vectors
I'm having the following situation in my ThreeJS app: I have one observation point P and one line L. Now I want to project perform a projection from P on the vector V which represents the line L. I ...
3
votes
1
answer
90
views
perpendicular residuals with scipy odr
I want to fit data to a power-law using scipy odr, which aims to minimize the perpendicular squared distances. I want to find the perpendicular distance between each point and the fit.
The "....
0
votes
1
answer
76
views
How do I keep the order of vectors after symmetric orthogonalization with Scipy?
scipy.linalg.orth orthogonalizes matrices with SVD. After orthogonalization, the vectors are put in the descending order of singular values. However, for some reasons, I need the orthogonalized ...
0
votes
0
answers
53
views
How can I generate matrix A satisfying AT*A=I with matlab?
I want to Randomly generate i.i.d. Gaussian ensemble A∈R m×n (m<<n) satisfying the transpose of A times A equals the identity matrix with matlab. Thanks!
I found an answer in mathworks, but the ...
1
vote
2
answers
144
views
Matrices in Julia with Orthogonality constraints
How do you construct random unitary matrices in Julia
An Orthogonal matrix is defined as $QQ^T=I_n=Q^TQ$ with $Q \in \mathbb{R}^{n \times n}$. This can be easily found in Julia from Manifolds.jl by ...
1
vote
1
answer
912
views
Pytorch torch.linalg.svd returning U and V^T, which are not orthogonal
Using U,S, VT = torch.linalg.svd(M), the matrix 'M' is large, so I am getting the matrices U and VT as non orthogonal. When I compute torch.norm(torch.mm(matrix, matrix.t()) - identity_matrix)) its 0....
0
votes
0
answers
111
views
How to generate an orthogonal symmetric matrix?
I want to create an orthogonal symmetric matrix of size 5 and size 6. Is there a way for me to generate this type of matrix? An orthogonal symmetric matrix is when a matrix A is equal to its transpose ...
1
vote
2
answers
696
views
Orthogonality of Instruction Set Architecture
I am studying the difference between CISC and RISC recently, and I've encountered into the term "Orthogonality". After doing some research, my understanding so far is that there are two &...
0
votes
1
answer
224
views
orthogonal weights in Network with Keras / Tensorflow
I want to initialise orthogonal weights with Keras / Tensorflow 1.14
So, I am modifying the following code (which works fine):
def __dictNN(self, x):
# Parameters
dim = self.__dim
...
0
votes
1
answer
66
views
Marriage of orthogonal array with a conditional requirement in R
I am a novice so my code will not be elegant!
I'm trying to determine an optimized 'recipe' of 6 ingredients with 5 levels of use.
Ingredients - (A, B, C, D, E, F)
Levels - (0%, 25%, 50%, 75%, 100%)
A ...
1
vote
2
answers
452
views
Re orthogonalization of vector with respect to matrix
I have a matrix A of size 50 X 6 and I have a vector x of size 50 X 1. Assume that all columns of A are orthogonal to each other. I have 2 questions:
What is the best way to check whether x is ...
1
vote
1
answer
99
views
Iterating over an image given a numpy ndarray for certain colored pixels in it
I have an image which is all black and white and has a certain colored pixels over the black part, which is pink(those colored pixels are all same i.e., they have have same rgb values).
I have the ...
0
votes
2
answers
607
views
taking input in a matrix of variable size in c++
I am trying to check the orthogonality of a matrix A in c++.
For that I am declaring a "MAX" value of number of rows and columns, then I am trying to get the number of rows and columns for ...
-1
votes
1
answer
89
views
Calculating orthogonal movement
A board game of 8 * 8.
One of the players is able to move using orthogonal movement, up to a max of 3 spaces.
How do I calculate the possible steps he can take?
3
votes
1
answer
1k
views
orthogonal distance from fit with scipy.odr
I perform an ODR fit for given data points with x and y uncertainty with scipy.odr. For the fit result I would like to see the orthogonal distances of each point from the fit. This can be easily ...
0
votes
1
answer
514
views
How can I create sine cosine and sawtooth signals in python
Hi there i want to construct a sine, cosine, and sawtooth signal with a frequency of 1 Hz and a sine signal with a frequency of 2 Hz. Examine whether these signals are orthogonal to each other.
We are ...
0
votes
1
answer
669
views
How do I set up orthogonal contrasts in R?
I have a data set consisting of several Types and two treatments (example below). I am using the lm() function in R to analyze it and emmeans for post hoc tests.
m <- lm(Y ~ Type*Treatment)
Anova(m,...
1
vote
1
answer
2k
views
Efficient Generation of Random Orthogonal Matrix in Python
I need to generate a lot of random mean-invariant orthogonal matrices for my work. A mean-invariant matrix has the property A*1_n=1_n, where 1_n is a vector of size n of the scalar 1, basicaly np.ones(...
0
votes
1
answer
233
views
What is the importance of Orthogonality in approximating functions in Digital Signal Processing?
I've just started a DSP course and am trying understand the big picture.
As I understand it, approximating signals is needed frequently in Digital Signal Processing. So, let's say I have a vector ...
2
votes
1
answer
621
views
Orthogonality of a 4x4 matrix
I am working on a MATLAB task which deals with stain removal.
What am I doing?
I have been given a 4x4 matrix. I have then been told that it may well be orthogonal. I have to make it prove that the ...
2
votes
0
answers
122
views
Orthogonal, Mean-Invariant Matrix Generation Between Python and Matlab
I needed a program that produces a random orthogonal matrix, which also preserves the mean and covariance of the columns of a matrix. In other words, the matrix should have the property of any ...
1
vote
0
answers
324
views
Loss function forcing orthogonality for the encoding of an autoencoder (NPCA)
I have implemented an autoencoder that should realize a non-linear version of a principal component analysis. In- and Output of the model is a the same dataset with n features and I am interested in ...
1
vote
0
answers
93
views
Weird behavior with orthogonal procrustes
Given two matrices mat1 and mat2, each one representing a set of 3 points in a 3 dimensional space, I want to rotate mat2 so that it matches mat1 using orthogonal procrustes :
mat1 <- t(matrix(c(1....
1
vote
1
answer
452
views
Get random 2D slices from a 3D NumPy array orthogonally across each dimension
I am trying to randomly sample 30% of a NumPy array of shape (790, 64, 64, 1). The last dimension is the channel info for the image so essentially it's a 3D image. The intention is to generate 2D ...
3
votes
0
answers
1k
views
Vertical scrolling (or visibleItemsInvalidationHandler) resets the inner offset of the orthogonal section with groupPagingCentered
I did UICollectionViewCompositionalLayout with orthogonal section with groupPagingCentered as follow:
func neighborsRealitiesSection() -> NSCollectionLayoutSection {
let itemSize = ...
3
votes
3
answers
3k
views
easiest way to construct an orthogonal vector in R [closed]
How would I construct an orthogonal vector to two existing vectors, v1 and v2?
[Unfortunately, stackoverflow wants some more prose here or complains that it does not meet standards.]
1
vote
3
answers
1k
views
Rotating high dimensional orthogonal vectors in python
Say I have orthogonal vectors of dimension n. I have two questions:
How to create/initialize n such orthogonal vectors in python using the existing packages (numpy, scipy, pytorch etc)? Ideally these ...
0
votes
1
answer
585
views
How to orthogonalize time series
I'm working with the MEG signal and to address the problem of spatial leakage I wanted to perform orthogonalization of the time series.
To have better understanding I started working with a sine ...
-1
votes
1
answer
1k
views
How to write this orthogonal projection formula in python? [duplicate]
projection of a vector 𝑥 onto a 1-dimensional subspace 𝑈 with basis vector 𝑏
𝜋𝑈(𝑥)=𝑏𝑏𝑇‖𝑏‖2𝑥
And for the general projection onto an M-dimensional subspace 𝑈 with basis vectors
𝜋�...
0
votes
1
answer
3k
views
Error when running mixed anova in R with two within factor and one between factor
I would like some help to use R to analyze an experiment in which three groups of participants were shown two types of stimulus three times each. The dependent variable is a continuous measure. Here ...
-1
votes
1
answer
149
views
High order derivatives of chebyshev polynomials needed
I need to evaluate high order (up to 4) derivatives of Chebyshev polynomials at points of the so called Chebyshev grid,
x(j)=cos(πj/N), j=0,...,N
Anyone know how to do that? I tried iterative ...
0
votes
1
answer
142
views
What is the necessary condition for two vector set be aligned by an orthogonal matrix?
Suppose there are two vector sets $A$ and $B \in \mathbb{R}^{f \times 3}$
If there is an orthogonal matrix $R \in \mathbb{R}^{3 \times 3}$ can align there two vector set perfectly, e.g. $RA = B$
...
1
vote
1
answer
4k
views
python plotting eigenvectors
I thought that eigenvectors had to be orthogonal to each other. The following seems to violate that. I wanted to check if I am doing something wrong. Thank you for any insight!!!
Here is the code for ...
0
votes
2
answers
682
views
Wrong result when plotting a plane and an orthogonal vector
I need to compute the components of a vector respect to another vector, in 3D. When displaying the results, while I am confident about the simple math under it, the visualization is plain wrong.
I ...
2
votes
0
answers
92
views
Solving eigenvectors/eigenvalues of sparse matrix in different ranges successively
I'm looking for eigenvalues/eigenvectors of a huge sparse matrix A (250k*250k) that lie in different eigenvalue ranges without calculating all the eigenvalues in between since it would just take too ...
3
votes
1
answer
2k
views
How to find a randomic Vector orthogonal to a given Vector
I have a Vector with 3 components (X,Y,Z) and i want to find a Vector orthogonal to the given one. Since the Vectors orthogonal to any Vector are infinite, i just need one that is randomic.
I've ...
0
votes
1
answer
431
views
Applying math to calculate the area of a jagged isometric square
I'm making an isometric game and I'd like to be able to determine the selected tile by the mouse position.
I've done this before using regular tiles, but isometric is much more complicated. I've had ...
1
vote
1
answer
743
views
How to work with a isometric / orthogonal view in Kivy?
The image below is a GridLayout 10 x 10 with buttons.
I'd like to create the same Grid but in an isometric / orthogonal 2d view.
It means that every button, instead of being a square, it might be ...
0
votes
3
answers
2k
views
How to create an orthogonal matrix in Matlab with one fixed column
I want to create a square NxN matrix orthogonal, with the constraint that the first column is a column vector of k*ones(N,1), where k is a constant at choice. Is there any procedure?
I.e.
A= [k * *;...
4
votes
0
answers
1k
views
Difference between a primitive construct and a primitive data type?
I'm reading a textbook evaluating a programming language implementation and I'm easily confused by terminology that I don't understand, but know how to use when writing a program. This is in regards ...
1
vote
1
answer
260
views
How to make all corners of rectangle as orthogonal
I have developed an application in top of ArcGIS Desktop using Arcobjects C#.Net. Application will create a rectangle by connecting four known co-ordinates. I would need to adjust all four corners as ...
1
vote
0
answers
977
views
Forcing straight AND orthogonal edges with dot
I have a program that automatically generates dot graphs representing the structure of a system. The system is defined by the user using a set of equations.
I would like to force dot displaying only ...
0
votes
2
answers
2k
views
PlantUML does not render arrows well in a class diagram (Skinparam linetype ortho mode)
I'm trying to make some complex class diagrams with PlantUML by having ortho layout for the relations between the classes.
Some arrows, especially those which are connected at the bottom of an ...
0
votes
1
answer
375
views
R: difficulties generating orthogonal polynomials between 0 and 1
I'm trying to do some regression on variables with the interval [0,1]. I'd like to include orthogonal quadratic and cubic components. The polynomials I am after are Shifted Legendre polynomials(...
4
votes
1
answer
5k
views
Generate a vector that is orthogonal to a set of other vectors in any dimension
Assume I have a set of vectors $ a_1, ..., a_d $ that are orthonormal to each other. Now, I want to find another vector $ a_{d+1} $ that is orthogonal to all the other vectors.
Is there an efficient ...
0
votes
0
answers
94
views
MATLAB: converting 3d plane into 3d matrix pixel locations
I am trying to get a slice of an elongated object in a 3d matrix (227x297x187 binary) that is orthogonal to its orientation..i.e. output image would be a 2d cross-section.
I was thinking the best ...
2
votes
3
answers
1k
views
Adding orthogonal regression line in ggplot
I have plotted a scatter graph in R, comparing expected to observed values,using the following script:
library(ggplot2)
library(dplyr)
r<-read_csv("Uni/MSci/Project/DATA/new data sheets/...
2
votes
2
answers
3k
views
Orthogonal edges layout in graphviz
I'm traying to use graphviz to generate orthogonal graphs:
graph G {
layout=neato
splines=ortho
A1 [ pos="1,1!" ]
A2 [ pos="2,1!" ]
A3 [ pos="3,1!" ]
A4 [ pos="4,1!" ]
Ae ...
1
vote
2
answers
2k
views
Are the eigenvectors returned in numpy.linalg.eig orthogonal? [duplicate]
Are the eigenvectors returned in numpy.linalg.eig orthogonal? If not, how can I get orthogonal and normalized eigenvectors and relative eighenvaules?
I tried some simple example myself, in general, ...
2
votes
1
answer
1k
views
How to generate sparse orthogonal matrix in python?
How can one generate random sparse orthogonal matrix?
I know there is a sparse matrices in scipy library but they are generally non-orthogonal. One can exploit QR-factorization, but it is not ...