Search Results

Search found 2093 results on 84 pages for 'sparse matrix'.

Page 6/84 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Recover Intel Matrix Raid Configuration

    - by Catalin DICU
    Hello, I had 2 HDDs in Intel Matrix Raid configuration on a motherboard with intel ICH9R. I had some RAID 0 partitions and one RAID 1 partition. Somehow when replacing my videocard I partially unpulugged the power connector from one of the HDD. I booted and only one disk was showing. So I turned off the PC and correctly plugged the power connector and how both HDDs are showing as "Non-Raid Disk" Is there a way to restore the raid configuration from before ? In fact I don't really remember how my partitions where configured, I had 2x100Gb + 1x296Gb in RAID 0 and one 50Gb in RAID 1 (using 2x320Gb HDDs) but I'm not sure how many volumes and how the partitions where allocated on the volumes. Is there a tool to find that ? Thanks

    Read the article

  • Retrieving model position after applying modeltransforms in XNA

    - by Glen Dekker
    For this method that the goingBeyond XNA tutorial provides, it would be really convenient if I could retrieve the new position of the model after I apply all the transforms to the mesh. I have edited the method a little for what I need. Does anyone know a way I can do this? public void DrawModel( Camera camera ) { Matrix scaleY = Matrix.CreateScale(new Vector3(1, 2, 1)); Matrix temp = Matrix.CreateScale(100f) * scaleY * rotationMatrix * translationMatrix * Matrix.CreateRotationY(MathHelper.Pi / 6) * translationMatrix2; Matrix[] modelTransforms = new Matrix[model.Bones.Count]; model.CopyAbsoluteBoneTransformsTo(modelTransforms); if (camera.getDistanceFromPlayer(position+position1) > 3000) return; foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = modelTransforms[mesh.ParentBone.Index] * temp * worldMatrix; effect.View = camera.viewMatrix; effect.Projection = camera.projectionMatrix; } mesh.Draw(); } }

    Read the article

  • How to derive euler angles from matrix or quaternion?

    - by KlashnikovKid
    Currently working on steering behavior for my AI and just hit a little mathematical bump. I'm in the process of writing an align function, which basically tries to match the agent's orientation with a target orientation. I've got a good source material for implementing this behavior but it uses euler angles to calculate the rotational delta, acceleration, and so on. This is nice, however I store orientation as a quaternion and the math library I'm using doesn't provide any functionality for deriving the euler angles. But if it helps I also have rotational matrices at my disposal too. What would be the best way to decompose the quaternion or rotational matrix to get the euler information? I found one source for decomposing the matrix, but I'm not quite getting the correct results. I'm thinking it may be a difference of column/row ordering of my matrices but then again, math isn't my strong point. http://nghiaho.com/?page_id=846

    Read the article

  • How do I build a matrix to translate one set of points to another?

    - by dotminic
    I've got 3 points in space that define a triangle. I've also got a vertex buffer made up of three vertices, that also represent a triangle that I will refer to as a "model". How can I can I find the matrix M that will transform vertex in my buffer to those 3 points in space ? For example, let's say my three points A, B, C are at locations: A.x = 10, A.y = 16, A.z = 8 B.x = 12, B.y = 11, B.z = 1 C.x = 19, C.y = 12, C.z = 3 given these coordinates how can I build a matrix that will translate and rotate my model such that both triangles have the exact same world space ? That is, I want the first vertex in my triangle model to have the same coordinates as A, the second to have the same coordinates as B, and same goes for C. nb: I'm using instanced rendering so I can't just give each vertex the same position as my 3 points. I have a set of three points defining a triangle, and only three vertices in my vertex buffer.

    Read the article

  • How to fill in Different String Values in Different Cells in Excel 2007 VBA marcos

    - by user325160
    Hello everyone, So I am trying to fill in Values "A-Z, 0-9" in a 2007 excel macro in four different locations (I am trying to put A-Z and 0-9 in cells: a1 to d9, e1 to h9, a10 to d18, and e10 to h18). So far I have the code: Sub TwoDArrays() Dim Matrix(9, 4) As Variant Dim Matrix2(9, 4) As Variant Dim Matrix3(9, 4) As Variant Dim Matrix4(9, 4) As Variant Matrix(1, 1) = "A" Matrix(1, 2) = "B" Matrix(1, 3) = "C" Matrix(1, 4) = "D" Matrix(2, 1) = "E" Matrix(2, 2) = "F" Matrix(2, 3) = "G" Matrix(2, 4) = "H" Matrix(3, 1) = "I" Matrix(3, 2) = "J" Matrix(3, 3) = "K" Matrix(3, 4) = "L" Matrix(4, 1) = "M" Matrix(4, 2) = "N" Matrix(4, 3) = "O" Matrix(4, 4) = "P" Matrix(5, 1) = "Q" Matrix(5, 2) = "R" Matrix(5, 3) = "S" Matrix(5, 4) = "T" Matrix(6, 1) = "U" Matrix(6, 2) = "V" Matrix(6, 3) = "W" Matrix(6, 4) = "X" Matrix(7, 1) = "Y" Matrix(7, 2) = "Z" Matrix(7, 3) = "0" Matrix(7, 4) = "1" Matrix(8, 1) = "2" Matrix(8, 2) = "3" Matrix(8, 3) = "4" Matrix(8, 4) = "5" Matrix(9, 1) = "6" Matrix(9, 2) = "7" Matrix(9, 3) = "8" Matrix(9, 4) = "9" Matrix2(1, 1) = "A" Matrix2(1, 2) = "B" Matrix2(1, 3) = "C" Matrix2(1, 4) = "D" Matrix2(2, 1) = "E" Matrix2(2, 2) = "F" Matrix2(2, 3) = "G" Matrix2(2, 4) = "H" Matrix2(3, 1) = "I" Matrix2(3, 2) = "J" Matrix2(3, 3) = "K" Matrix2(3, 4) = "L" Matrix2(4, 1) = "M" Matrix2(4, 2) = "N" Matrix2(4, 3) = "O" Matrix2(4, 4) = "P" Matrix2(5, 1) = "Q" Matrix2(5, 2) = "R" Matrix2(5, 3) = "S" Matrix2(5, 4) = "T" Matrix2(6, 1) = "U" Matrix2(6, 2) = "V" Matrix2(6, 3) = "W" Matrix2(6, 4) = "X" Matrix2(7, 1) = "Y" Matrix2(7, 2) = "Z" Matrix2(7, 3) = "0" Matrix2(7, 4) = "1" Matrix2(8, 1) = "2" Matrix2(8, 2) = "3" Matrix2(8, 3) = "4" Matrix2(8, 4) = "5" Matrix2(9, 1) = "6" Matrix2(9, 2) = "7" Matrix2(9, 3) = "8" Matrix2(9, 4) = "9" Matrix3(1, 1) = "A" Matrix3(1, 2) = "B" Matrix3(1, 3) = "C" Matrix3(1, 4) = "D" Matrix3(2, 1) = "E" Matrix3(2, 2) = "F" Matrix3(2, 3) = "G" Matrix3(2, 4) = "H" Matrix3(3, 1) = "I" Matrix3(3, 2) = "J" Matrix3(3, 3) = "K" Matrix3(3, 4) = "L" Matrix3(4, 1) = "M" Matrix3(4, 2) = "N" Matrix3(4, 3) = "O" Matrix3(4, 4) = "P" Matrix3(5, 1) = "Q" Matrix3(5, 2) = "R" Matrix3(5, 3) = "S" Matrix3(5, 4) = "T" Matrix3(6, 1) = "U" Matrix3(6, 2) = "V" Matrix3(6, 3) = "W" Matrix3(6, 4) = "X" Matrix3(7, 1) = "Y" Matrix3(7, 2) = "Z" Matrix3(7, 3) = "0" Matrix3(7, 4) = "1" Matrix3(8, 1) = "2" Matrix3(8, 2) = "3" Matrix3(8, 3) = "4" Matrix3(8, 4) = "5" Matrix3(9, 1) = "6" Matrix3(9, 2) = "7" Matrix3(9, 3) = "8" Matrix3(9, 4) = "9" Matrix4(1, 1) = "A" Matrix4(1, 2) = "B" Matrix4(1, 3) = "C" Matrix4(1, 4) = "D" Matrix4(2, 1) = "E" Matrix4(2, 2) = "F" Matrix4(2, 3) = "G" Matrix4(2, 4) = "H" Matrix4(3, 1) = "I" Matrix4(3, 2) = "J" Matrix4(3, 3) = "K" Matrix4(3, 4) = "L" Matrix4(4, 1) = "M" Matrix4(4, 2) = "N" Matrix4(4, 3) = "O" Matrix4(4, 4) = "P" Matrix4(5, 1) = "Q" Matrix4(5, 2) = "R" Matrix4(5, 3) = "S" Matrix4(5, 4) = "T" Matrix4(6, 1) = "U" Matrix4(6, 2) = "V" Matrix4(6, 3) = "W" Matrix4(6, 4) = "X" Matrix4(7, 1) = "Y" Matrix4(7, 2) = "Z" Matrix4(7, 3) = "0" Matrix4(7, 4) = "1" Matrix4(8, 1) = "2" Matrix4(8, 2) = "3" Matrix4(8, 3) = "4" Matrix4(8, 4) = "5" Matrix4(9, 1) = "6" Matrix4(9, 2) = "7" Matrix4(9, 3) = "8" Matrix4(9, 4) = "9" For i = 1 To 9 For j = 1 To 4 Cells(i, j) = Matrix(i, j) Next j Next i 'For i = 1 To 9 'For j = 1 To 4 ' Range("a1:d1", "a1:a10").Value = Matrix(i, j) 'Application.WorksheetFunction.Transpose (Matrix) 'Next j 'Next i End Sub However, at the top for loop where it does not use the Range function with the cells, I can only do this for cells a1:d9 (a1 to d9) and if I use the second for loop with the range, get the value 9 appearing in every cell from a1 to d9. So is there a way to make it so that I can get the values A-Z and 0-9 in the other cells I specified above? Thank you.

    Read the article

  • Multiplying two matrices from two text files with unknown dimensions

    - by wes schwertner
    This is my first post here. I've been working on this c++ question for a while now and have gotten nowhere. Maybe you guys can give me some hints to get me started. My program has to read two .txt files each containing one matrix. Then it has to multiply them and output it to another .txt file. My confusion here though is how the .txt files are setup and how to get the dimensions. Here is an example of matrix 1.txt. #ivalue #jvalue value 1 1 1.0 2 2 1 The dimension of the matrix is 2x2. 1.0 0 0 1 Before I can start multiplying these matrices I need to get the i and j value from the text file. The only way I have found out to do this is int main() { ifstream file("a.txt"); int numcol; float col; for(int x=0; x<3;x++) { file>>col; cout<<col; if(x==1) //grabs the number of columns numcol=col; } cout<<numcol; } The problem is I don't know how to get to the second line to read the number of rows. And on top of that I don't think this will give me accurate results for other matrices files. Let me know if anything is unclear. UPDATE Thanks! I got getline to work correctly. But now I am running into another problem. In matrix B it is setup like: #ivalue #jvalue Value 1 1 0.1 1 2 0.2 2 1 0.3 2 2 0.4 I need to let the program know that it needs to go down 4 lines, maybe even more (The matrices dimensions are unknown. My matrix B example is a 2x2, but it could be a 20x20). I have a while(!file.eof()) loop my program to let it loop until the end of file. I know I need a dynamic array for multiplying, but would I need one here also? #include <iostream> #include <fstream> using namespace std; int main() { ifstream file("a.txt"); //reads matrix A while(!file.eof()) { int temp; int numcol; string numrow; float row; float col; for(int x=0; x<3;x++) { file>>col; if(x==1) { numcol=col; //number of columns } } string test; getline(file, test); //next line to get rows for(int x=0; x<3; x++) { file>>test; if(x==1) { numrow=test; //sets number of rows } } cout<<numrow; cout<<numcol<<endl; } ifstream file1("b.txt"); //reads matrix 2 while(!file1.eof()) { int temp1; int numcol1; string numrow1; float row1; float col1; for(int x=0; x<2;x++) { file1>>col1; if(x==1) numcol1=col1; //sets number of columns } string test1; getline(file1, test1); //In matrix B there are four rows. getline(file1, test1); //These getlines go down a row. getline(file1, test1); //Need help here. for(int x=0; x<2; x++) { file1>>test1; if(x==1) numrow1=test1; } cout<<numrow1; cout<<numcol1<<endl; } }

    Read the article

  • Windows 2008 Terminal Services "Easy Print" and Matrix Printers

    - by Cesar87
    Server: Windows 2008 Server Standard SP2 with "Terminal Services" role Clients: Windows XP SP3 + .NET 3.5 Framework SP1 + Remote Desktop Client 7.0 We are using "Easy Print" feature which allows programs running on server to "see" printers installed on client machines. Everything works fine, EXCEPT when we send a text-only output to a dot-matrix printer. In this case, the printer only outputs a blank page. At first, we had problems with the error "Windows Presentation Foundation Terminal Server Print W has encountered a problem and needs to close." but this was fixed by replacing TsWpfWrp.exe with the one from Vista SP1 as suggested here. But now, we only get a blank page! Every other (graphical) document we sent to printer works 100%. We also tried to use the "Generic text-only" driver, but the result is same. Now we are trying to change parameters like print processor on "advanced" tab from printer driver to see if something happen. But this is just guessing and we really don't know what to try anymore. The problem appears to be on Easy Print driver, but we found almost no resources about it. Any tips are welcome.

    Read the article

  • Large sparse (stiff) ODE system needed for testing

    - by macydanim
    I hope this is the right place for this question. I have been working on a sparse stiff implicit ODE solver and have finished the code so far. I now tested the solver with the Van der Pol equation, and another stiff problem, which is of dimension 4. But to perform better tests I am searching for a bigger system. I'm thinking of the order N = 100...1000, if possible stiff and sparse. Does anybody have an example I could use? I really don't know where to search.

    Read the article

  • XNA 4.0: 2D Camera Y and X are going in wrong direction

    - by Setheron
    I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer. My problem is that I am trying to create a camera class and have it so that my camera follows the proper RHS, however the Y axis seems to be inverted since on the screen the 0 starts at the top. Here is my Camera2D Class: class Camera2D { private Vector2 _position; private float _zoom; private float _rotation; private float _cameraSpeed; private Viewport _viewport; private Matrix _viewMatrix; private Matrix _viewMatrixIverse; public static float MinZoom = float.Epsilon; public static float MaxZoom = float.MaxValue; public Camera2D(Viewport viewport) { _viewMatrix = Matrix.Identity; _viewport = viewport; _cameraSpeed = 4.0f; _zoom = 1.0f; _rotation = 0.0f; _position = Vector2.Zero; } public void Move(Vector2 amount) { _position += amount; } public void Zoom(float amount) { _zoom += amount; _zoom = MathHelper.Clamp(_zoom, MaxZoom, MinZoom); UpdateViewTransform(); } public Vector2 Position { get { return _position; } set { _position = value; UpdateViewTransform(); } } public Matrix ViewMatrix { get { return _viewMatrix; } } private void UpdateViewTransform() { Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0)) * Matrix.CreateScale(new Vector3(1f, 1f, 1f)); _viewMatrix = Matrix.CreateRotationZ(_rotation) * Matrix.CreateScale(new Vector3(_zoom, _zoom, 1.0f)) * Matrix.CreateTranslation(_position.X, _position.Y, 0.0f); _viewMatrix = proj * _viewMatrix; } } I test it using SpriteBatch in the following way: protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); Vector2 position = new Vector2(0, 0); // TODO: Add your drawing code here spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, camera.ViewMatrix); Texture2D circle = CreateCircle(100); spriteBatch.Draw(circle, position, Color.Red); spriteBatch.End(); base.Draw(gameTime); }

    Read the article

  • How can I transform a Point2f with a matrix on Android?

    - by Vivendi
    I'm developing for Android and I'm using the android.renderscript.Matrix3f class to do some calculations. What I need to do now is to now is to do something like mat.tranform(pointIn, pointOut); So I need to transform a matrix by a given Point class. In awt I would simply do this: AffineTransform t = new AffineTransform(); Point2D.Float p = new Point2D.Float(); t.transform( p, p ); But in Android I now have this: Matrix3f t = new Matrix3f(); PointF p = new PointF(); // Now I need to tranform it somehow.. But the Matrix3f class in Android doesn't have a Matrix.transform(Point2D ptSrc, Point2D ptDst) method. So I guess I have to do the transformation manually. But I'm not really sure how that works. From what I've seen it's something like a translate and then a rotate? Could anyone please tell me how to do this in code?

    Read the article

  • Performance of Java matrix math libraries?

    - by dfrankow
    We are computing something whose runtime is bound by matrix operations. (Some details below if interested.) This experience prompted the following question: Do folk have experience with the performance of Java libraries for matrix math (e.g., multiply, inverse, etc.)? For example: JAMA: http://math.nist.gov/javanumerics/jama/ COLT: http://acs.lbl.gov/~hoschek/colt/ Apache commons math: http://commons.apache.org/math/ I searched and found nothing. Details of our speed comparison: We are using Intel FORTRAN (ifort (IFORT) 10.1 20070913). We have reimplemented it in Java (1.6) using Apache commons math 1.2 matrix ops, and it agrees to all of its digits of accuracy. (We have reasons for wanting it in Java.) (Java doubles, Fortran real*8). Fortran: 6 minutes, Java 33 minutes, same machine. jvisualm profiling shows much time spent in RealMatrixImpl.{getEntry,isValidCoordinate} (which appear to be gone in unreleased Apache commons math 2.0, but 2.0 is no faster). Fortran is using Atlas BLAS routines (dpotrf, etc.). Obviously this could depend on our code in each language, but we believe most of the time is in equivalent matrix operations. In several other computations that do not involve libraries, Java has not been much slower, and sometimes much faster.

    Read the article

  • reformatting a matrix in matlab with nan values

    - by Kate
    This post follows a previous question regarding the restructuring of a matrix: re-formatting a matrix in matlab An additional problem I face is demonstrated by the following example: depth = [0:1:20]'; data = rand(1,length(depth))'; d = [depth,data]; d = [d;d(1:20,:);d]; Here I would like to alter this matrix so that each column represents a specific depth and each row represents time, so eventually I will have 3 rows (i.e. days) and 21 columns (i.e. measurement at each depth). However, we cannot reshape this because the number of measurements for a given day are not the same i.e. some are missing. This is known by: dd = sortrows(d,1); for i = 1:length(depth); e(i) = length(dd(dd(:,1)==depth(i),:)); end From 'e' we find that the number of depth is different for different days. How could I insert a nan into the matrix so that each day has the same depth values? I could find the unique depths first by: unique(d(:,1)) From this, if a depth (from unique) is missing for a given day I would like to insert the depth to the correct position and insert a nan into the respective location in the column of data. How can this be achieved?

    Read the article

  • How is the gimbal locked problem solved using accumulative matrix transformations

    - by Luke San Antonio
    I am reading the online "Learning Modern 3D Graphics Programming" book by Jason L. McKesson As of now, I am up to the gimbal lock problem and how to solve it using quaternions. However right here, at the Quaternions page. Part of the problem is that we are trying to store an orientation as a series of 3 accumulated axial rotations. Orientations are orientations, not rotations. And orientations are certainly not a series of rotations. So we need to treat the orientation of the ship as an orientation, as a specific quantity. I guess this is the first spot I start to get confused, the reason is because I don't see the dramatic difference between orientations and rotations. I also don't understand why an orientation cannot be represented by a series of rotations... Also: The first thought towards this end would be to keep the orientation as a matrix. When the time comes to modify the orientation, we simply apply a transformation to this matrix, storing the result as the new current orientation. This means that every yaw, pitch, and roll applied to the current orientation will be relative to that current orientation. Which is precisely what we need. If the user applies a positive yaw, you want that yaw to rotate them relative to where they are current pointing, not relative to some fixed coordinate system. The concept, I understand, however I don't understand how if accumulating matrix transformations is a solution to this problem, how the code given in the previous page isn't just that. Here's the code: void display() { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glutil::MatrixStack currMatrix; currMatrix.Translate(glm::vec3(0.0f, 0.0f, -200.0f)); currMatrix.RotateX(g_angles.fAngleX); DrawGimbal(currMatrix, GIMBAL_X_AXIS, glm::vec4(0.4f, 0.4f, 1.0f, 1.0f)); currMatrix.RotateY(g_angles.fAngleY); DrawGimbal(currMatrix, GIMBAL_Y_AXIS, glm::vec4(0.0f, 1.0f, 0.0f, 1.0f)); currMatrix.RotateZ(g_angles.fAngleZ); DrawGimbal(currMatrix, GIMBAL_Z_AXIS, glm::vec4(1.0f, 0.3f, 0.3f, 1.0f)); glUseProgram(theProgram); currMatrix.Scale(3.0, 3.0, 3.0); currMatrix.RotateX(-90); //Set the base color for this object. glUniform4f(baseColorUnif, 1.0, 1.0, 1.0, 1.0); glUniformMatrix4fv(modelToCameraMatrixUnif, 1, GL_FALSE, glm::value_ptr(currMatrix.Top())); g_pObject->Render("tint"); glUseProgram(0); glutSwapBuffers(); } To my understanding, isn't what he is doing (modifying a matrix on a stack) considered accumulating matrices, since the author combined all the individual rotation transformations into one matrix which is being stored on the top of the stack. My understanding of a matrix is that they are used to take a point which is relative to an origin (let's say... the model), and make it relative to another origin (the camera). I'm pretty sure this is a safe definition, however I feel like there is something missing which is blocking me from understanding this gimbal lock problem. One thing that doesn't make sense to me is: If a matrix determines the difference relative between two "spaces," how come a rotation around the Y axis for, let's say, roll, doesn't put the point in "roll space" which can then be transformed once again in relation to this roll... In other words shouldn't any further transformations to this point be in relation to this new "roll space" and therefore not have the rotation be relative to the previous "model space" which is causing the gimbal lock. That's why gimbal lock occurs right? It's because we are rotating the object around set X, Y, and Z axes rather than rotating the object around it's own, relative axes. Or am I wrong? Since apparently this code I linked in isn't an accumulation of matrix transformations can you please give an example of a solution using this method. So in summary: What is the difference between a rotation and an orientation? Why is the code linked in not an example of accumulation of matrix transformations? What is the real, specific purpose of a matrix, if I had it wrong? How could a solution to the gimbal lock problem be implemented using accumulation of matrix transformations? Also, as a bonus: Why are the transformations after the rotation still relative to "model space?" Another bonus: Am I wrong in the assumption that after a transformation, further transformations will occur relative to the current? Also, if it wasn't implied, I am using OpenGL, GLSL, C++, and GLM, so examples and explanations in terms of these are greatly appreciated, if not necessary. The more the detail the better! Thanks in advance...

    Read the article

  • Fast 4x4 matrix multiplication in Java with NIO float buffers

    - by kayahr
    I know there are LOT of questions like that but I can't find one specific to my situation. I have 4x4 matrices implemented as NIO float buffers (These matrices are used for OpenGL). Now I want to implement a multiply method which multiplies Matrix A with Matrix B and stores the result in Matrix C. So the code may look like this: class Matrix4f { private FloatBuffer buffer = FloatBuffer.allocate(16); public Matrix4f multiply(Matrix4f matrix2, Matrix4f result) { {{{result = this * matrix2}}} <-- I need this code return result; } } What is the fastest possible code to do this multiplication? Some OpenGL implementations (Like the OpenGL ES stuff in Android) provide native code for this but others doesn't. So I want to provide a generic multiplication method for these implementations.

    Read the article

  • Creating matrix of maximum values indices in MATLAB

    - by Gacek
    Using MATLAB, I have an array of values of size 8 rows x N columns. I need to create a matrix of the same size, that counts maximum values in each column and puts 1 in the cell that contains maximum value, and 0 elsewhere. A little example. Lets assume we have an array of values D: D = 0.0088358 0.0040346 0.40276 0.0053221 0.017503 0.011966 0.015095 0.017383 0.14337 0.38608 0.16509 0.15763 0.27546 0.25433 0.2764 0.28442 0.01629 0.0060465 0.0082339 0.0099775 0.034521 0.01196 0.016289 0.021012 0.12632 0.13339 0.11113 0.10288 0.3777 0.19219 0.005005 0.40137 Then, the output matrix for such matrix D would be: 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 Is there a way to do it without catching vector of indices from max function and then putting ones in the right place using for loop?

    Read the article

  • dojo.gfx matrix transformation

    - by Linus
    Matrix transformations has got my head spinning. I've got a dojox.gfx.group which I want to be draggable with Mover and then be able to rotate it around a certain point on the surface. My basic code looks like this: this.m = dojox.gfx.matrix, . . . updateMatrix: function(){ var mtx = this.group._getRealMatrix(); var trans_m = this.m.translate(mtx.dx, mtx.dy); this.group.setTransform([this.m.rotateAt(this.rotation, 0, 0), trans_m]); } The rotation point is at (0,0) just to keep things simple. I don't seem to understand how the group is being rotated. Any reference to simplistic tutorial on matrix transformations would also help. The ones I've checked out haven't help too much.

    Read the article

  • Basic C++ code for multiplication of 2 matrix or vectors (C++ beginner)

    - by Ice
    I am a new C++ user and I am also doing a major in Maths so thought I would try implement a simple calculator. I got some code off the internet and now I just need help to multiply elements of 2 matrices or vectors. Matrixf multiply(Matrixf const& left, Matrixf const& right) { // error check if (left.ncols() != right.nrows()) { throw std::runtime_error("Unable to multiply: matrix dimensions not agree."); } /* I have all the other part of the code for matrix*/ /** Now I am not sure how to implement multiplication of vector or matrix.**/ Matrixf ret(1, 1); return ret; }

    Read the article

  • How to write a XSLT for this XML?

    - by atrueguy
    <?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve"> <g id="Original_Text"> <line x1="92.676" y1="500.913" x2="92.676" y2="500.262"/> <line x1="15.208" y1="500.913" x2="15.208" y2="500.262"/> <line x1="92.676" y1="500.262" x2="92.676" y2="500.913"/> <line x1="15.208" y1="510.329" x2="15.208" y2="509.678"/> <line x1="92.676" y1="500.913" x2="92.676" y2="500.262"/> <rect x="15.208" y="574.678" display="none" width="77.468" height="0.651"/> <text transform="matrix(1 0 0 1 258.6782 28.9111)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="8.4629">Bartlet</tspan><tspan x="24.459" y="0" font-family="'ArialMT'" font-size="8.4629">t</tspan><tspan x="26.895" y="0" font-family="'ArialMT'" font-size="8.4629"> </tspan><tspan x="29.035" y="0" font-family="'ArialMT'" font-size="8.4629">Managemen</tspan><tspan x="76.081" y="0" font-family="'ArialMT'" font-size="8.4629">t</tspan><tspan x="78.601" y="0" font-family="'ArialMT'" font-size="8.4629"> </tspan><tspan x="80.741" y="0" font-family="'ArialMT'" font-size="8.4629">Services</tspan></text> <text transform="matrix(1 0 0 1 522.9805 39.562)"><tspan x="0" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Report</tspan><tspan x="21.493" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="25.382" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.343" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Home</tspan></text> <line fill="none" stroke="#0000FF" stroke-width="0.651" stroke-miterlimit="10" x1="522.98" y1="40.213" x2="569.852" y2="40.213"/> <text transform="matrix(1 0 0 1 261.2822 39.3267)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Consolidate</tspan><tspan x="37.818" y="0" font-family="'ArialMT'" font-size="7.1609">d</tspan><tspan x="41.901" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="44.105" y="0" font-family="'ArialMT'" font-size="7.1609">Weekl</tspan><tspan x="64.001" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="67.975" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="70.18" y="0" font-family="'ArialMT'" font-size="7.1609">Sales</tspan><tspan x="88.092" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="90.297" y="0" font-family="'ArialMT'" font-size="7.1609">Report</tspan></text> <text transform="matrix(1 0 0 1 522.9775 49.3267)"><tspan x="0" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Stor</tspan><tspan x="13.133" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="17.566" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="19.527" y="0" fill="#0000FF" font-family="'ArialMT'" font-size="7.1609">Finder</tspan></text> <line fill="none" stroke="#0000FF" stroke-width="0.651" stroke-miterlimit="10" x1="521.98" y1="49.978" x2="562.341" y2="49.978"/> <text transform="matrix(1 0 0 1 282.7881 49.9775)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">P</tspan><tspan x="4.776" y="0" font-family="'ArialMT'" font-size="7.1609">D</tspan><tspan x="10.27" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="12.475" y="0" font-family="'ArialMT'" font-size="7.1609"> / </tspan></text> <text transform="matrix(1 0 0 1 123.5044 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">1</tspan></text> <text transform="matrix(1 0 0 1 190.1138 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">2</tspan></text> <text transform="matrix(1 0 0 1 261.6782 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">3</tspan></text> <text transform="matrix(1 0 0 1 331.377 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">4</tspan></text> <text transform="matrix(1 0 0 1 400.3164 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Wee</tspan><tspan x="14.724" y="0" font-family="'ArialMT'" font-size="7.1609">k</tspan><tspan x="18.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.153" y="0" font-family="'ArialMT'" font-size="7.1609">5</tspan></text> <text transform="matrix(1 0 0 1 461.751 60.9487)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">P</tspan><tspan x="4.805" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="7.404" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="11.808" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="14.406" y="0" font-family="'ArialMT'" font-size="7.1609">D</tspan><tspan x="19.864" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.068" y="0" font-family="'ArialMT'" font-size="7.1609">Total</tspan></text> <text transform="matrix(1 0 0 1 527.6309 60.8589)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Yea</tspan><tspan x="12.741" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="15.699" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="18.298" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="22.673" y="0" font-family="'ArialMT'" font-size="7.1609">o</tspan><tspan x="27.12" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="29.72" y="0" font-family="'ArialMT'" font-size="7.1609">Dat</tspan><tspan x="40.863" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="45.419" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="47.623" y="0" font-family="'ArialMT'" font-size="7.1609">Total</tspan></text> <text transform="matrix(1 0 0 1 112.853 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 148.0059 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 184.4619 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 218.9629 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 255.4194 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 289.9204 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 326.377 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 360.8779 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 397.334 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 431.835 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 470.2461 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 506.0508 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 546.4092 72.6265)" font-family="'ArialMT'" font-size="7.1609">$</text> <text transform="matrix(1 0 0 1 584.1689 72.6265)" font-family="'ArialMT'" font-size="7.1609">%</text> <text transform="matrix(1 0 0 1 15.1997 83.394)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">KFC</tspan></text> <text transform="matrix(1 0 0 1 15.1997 94.1616)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">A&amp;W</tspan></text> <text transform="matrix(1 0 0 1 15.1997 104.9287)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">LJS</tspan></text> <text transform="matrix(1 0 0 1 15.1924 115.6963)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ne</tspan><tspan x="9.154" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="11.716" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="13.677" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="16.277" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.237" y="0" font-family="'ArialMT'" font-size="7.1609">TB</tspan></text> <text transform="matrix(1 0 0 1 15.1924 126.9639)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Net</tspan></text> <text transform="matrix(1 0 0 1 15.1851 149.2949)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Las</tspan><tspan x="11.545" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="13.671" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.632" y="0" font-family="'ArialMT'" font-size="7.1609">Yea</tspan><tspan x="28.374" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="31.252" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="33.213" y="0" font-family="'ArialMT'" font-size="7.1609">Sales</tspan></text> <text transform="matrix(1 0 0 1 15.1855 161.0625)" font-family="'ArialMT'" font-size="7.1609">Increase</text> <text transform="matrix(1 0 0 1 15.2065 171.8296)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Las</tspan><tspan x="11.545" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="13.671" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.632" y="0" font-family="'ArialMT'" font-size="7.1609">yea</tspan><tspan x="27.178" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="29.949" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="31.91" y="0" font-family="'ArialMT'" font-size="7.1609">Nex</tspan><tspan x="44.644" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="46.884" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="48.845" y="0" font-family="'ArialMT'" font-size="7.1609">Week</tspan></text> <text transform="matrix(1 0 0 1 15.2065 193.3574)" font-family="'ArialMT'" font-size="7.1609">Chicken</text> <text transform="matrix(1 0 0 1 15.1997 205.125)" font-family="'ArialMT'" font-size="7.1609">Filets</text> <text transform="matrix(1 0 0 1 15.1997 215.8926)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Popcor</tspan><tspan x="22.689" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="26.686" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="28.646" y="0" font-family="'ArialMT'" font-size="7.1609">Chicken</tspan></text> <text transform="matrix(1 0 0 1 15.1997 226.6602)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Crisp</tspan><tspan x="16.71" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="20.828" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.788" y="0" font-family="'ArialMT'" font-size="7.1609">Strips</tspan></text> <text transform="matrix(1 0 0 1 15.1997 237.4272)" font-family="'ArialMT'" font-size="7.1609">Special</text> <text transform="matrix(1 0 0 1 15.1924 248.1948)" font-family="'ArialMT'" font-size="7.1609">Wings</text> <text transform="matrix(1 0 0 1 15.1924 257.9624)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Subtota</tspan><tspan x="24.686" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="26.448" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="28.652" y="0" font-family="'ArialMT'" font-size="7.1609">Chicken</tspan></text> <text transform="matrix(1 0 0 1 15.1851 280.2935)" font-family="'ArialMT'" font-size="7.1609">Shortening</text> <text transform="matrix(1 0 0 1 15.1851 291.5605)" font-family="'ArialMT'" font-size="7.1609">Flour</text> <text transform="matrix(1 0 0 1 15.1851 302.3281)" font-family="'ArialMT'" font-size="7.1609">Biscuits</text> <text transform="matrix(1 0 0 1 15.1851 313.0957)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Frie</tspan><tspan x="12.332" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="16.278" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.239" y="0" font-family="'ArialMT'" font-size="7.1609">/</tspan><tspan x="20.844" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.805" y="0" font-family="'ArialMT'" font-size="7.1609">Onio</tspan><tspan x="37.931" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="42.329" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="44.29" y="0" font-family="'ArialMT'" font-size="7.1609">Rings</tspan></text> <text transform="matrix(1 0 0 1 15.1851 323.9385)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Potatoe</tspan><tspan x="24.686" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="28.646" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="30.606" y="0" font-family="'ArialMT'" font-size="7.1609">-</tspan><tspan x="33.206" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="35.167" y="0" font-family="'ArialMT'" font-size="7.1609">Mashed</tspan></text> <text transform="matrix(1 0 0 1 15.1851 334.6309)" font-family="'ArialMT'" font-size="7.1609">Desserts</text> <text transform="matrix(1 0 0 1 15.1851 345.3979)" font-family="'ArialMT'" font-size="7.1609">Drinks</text> <text transform="matrix(1 0 0 1 15.1851 357.1655)" font-family="'ArialMT'" font-size="7.1609">Corn</text> <text transform="matrix(1 0 0 1 15.1851 367.4331)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ms</tspan><tspan x="9.545" y="0" font-family="'ArialMT'" font-size="7.1609">c</tspan><tspan x="13.663" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="15.624" y="0" font-family="'ArialMT'" font-size="7.1609">Entrees</tspan></text> <text transform="matrix(1 0 0 1 15.1846 378.2002)" font-family="'ArialMT'" font-size="7.1609">Salads</text> <text transform="matrix(1 0 0 1 15.1846 388.9678)" font-family="'ArialMT'" font-size="7.1609">Condiments</text> <text transform="matrix(1 0 0 1 15.1846 400.2354)" font-family="'ArialMT'" font-size="7.1609">Paper</text> <text transform="matrix(1 0 0 1 15.2012 410.9385)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">A&amp;</tspan><tspan x="9.553" y="0" font-family="'ArialMT'" font-size="7.1609">W</tspan><tspan x="16.927" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.888" y="0" font-family="'ArialMT'" font-size="7.1609">Sandwiches</tspan></text> <text transform="matrix(1 0 0 1 15.1943 421.2051)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">LJ</tspan><tspan x="7.563" y="0" font-family="'ArialMT'" font-size="7.1609">S</tspan><tspan x="12.368" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">Product</tspan></text> <text transform="matrix(1 0 0 1 15.1938 431.4736)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">T</tspan><tspan x="4.374" y="0" font-family="'ArialMT'" font-size="7.1609">B</tspan><tspan x="9.766" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="11.727" y="0" font-family="'ArialMT'" font-size="7.1609">Product</tspan></text> <text transform="matrix(1 0 0 1 15.208 441.2402)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">C.O.S</tspan></text> <text transform="matrix(1 0 0 1 15.187 465.0713)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Hourl</tspan><tspan x="17.112" y="0" font-family="'ArialMT'" font-size="7.1609">y</tspan><tspan x="20.829" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="22.79" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1797 474.8389)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Mgm</tspan><tspan x="15.913" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="18.225" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="20.186" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1724 486.6064)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Labor</tspan></text> <text transform="matrix(1 0 0 1 15.1655 507.7412)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Tota</tspan><tspan x="14.329" y="0" font-family="'ArialMT'" font-size="7.1609">l</tspan><tspan x="16.457" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.661" y="0" font-family="'ArialMT'" font-size="7.1609">Controllable</tspan></text> <text transform="matrix(1 0 0 1 15.1655 530.2686)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Charg</tspan><tspan x="19.503" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="24.088" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="26.048" y="0" font-family="'ArialMT'" font-size="7.1609">Count</tspan></text> <text transform="matrix(1 0 0 1 15.1729 542.0361)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Charg</tspan><tspan x="19.503" y="0" font-family="'ArialMT'" font-size="7.1609">e</tspan><tspan x="24.088" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="26.048" y="0" font-family="'ArialMT'" font-size="7.1609">Ticke</tspan><tspan x="43.157" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="45.576" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="47.537" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1553 563.5635)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Coupo</tspan><tspan x="21.102" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="25.385" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.346" y="0" font-family="'ArialMT'" font-size="7.1609">Count</tspan></text> <text transform="matrix(1 0 0 1 15.1479 574.3311)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Coupo</tspan><tspan x="21.102" y="0" font-family="'ArialMT'" font-size="7.1609">n</tspan><tspan x="25.385" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="27.346" y="0" font-family="'ArialMT'" font-size="7.1609">$</tspan></text> <text transform="matrix(1 0 0 1 15.1582 595.8594)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Ticke</tspan><tspan x="17.108" y="0" font-family="'ArialMT'" font-size="7.1609">t</tspan><tspan x="19.528" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="21.489" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1582 617.3867)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Hea</tspan><tspan x="13.136" y="0" font-family="'ArialMT'" font-size="7.1609">d</tspan><tspan x="17.57" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="19.531" y="0" font-family="'ArialMT'" font-size="7.1609">Average</tspan></text> <text transform="matrix(1 0 0 1 15.1582 628.1543)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Piece</tspan><tspan x="17.913" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="22.138" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="24.099" y="0" font-family="'ArialMT'" font-size="7.1609">Scrapped</tspan></text> <text transform="matrix(1 0 0 1 15.1514 639.4219)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Piece</tspan><tspan x="17.913" y="0" font-family="'ArialMT'" font-size="7.1609">s</tspan><tspan x="22.138" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="24.099" y="0" font-family="'ArialMT'" font-size="7.1609">Unacc</tspan><tspan x="44.396" y="0" font-family="'ArialMT'" font-size="7.1609">.</tspan><tspan x="46.887" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="48.848" y="0" font-family="'ArialMT'" font-size="7.1609">For</tspan></text> <text transform="matrix(1 0 0 1 15.1514 650.6895)" font-family="'ArialMT'" font-size="7.1609">Efficiency</text> <text transform="matrix(1 0 0 1 15.1514 671.2168)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="7.1609">Cas</tspan><tspan x="12.734" y="0" font-family="'ArialMT'" font-size="7.1609">h</tspan><tspan x="16.925" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="18.885" y="0" font-family="'ArialMT'" font-size="7.1609">ove</tspan><tspan x="30.431" y="0" font-family="'ArialMT'" font-size="7.1609">r</tspan><tspan x="33.202" y="0" font-family="'ArialMT'" font-size="7.1609"> </tspan><tspan x="35.163" y="0" font-family="'ArialMT'" font-size="7.1609">/(short)</tspan></text> <path stroke="#000000" d="M10,488.932"/> </g> <g id="Pieces_Unaccounted"> <g id="l_x5F_u_x5F_pieces_x5F_unaccounted"> <line id="UnaccountedFor_1_" fill="none" stroke="#000000" stroke-width="0.5" x1="10" y1="640" x2="599.5" y2="640"/> </g> </g> <g id="Total_Labor"> <g id="Double_Lines"> <line id="Btm_Line" stroke="#000000" stroke-width="0.5" x1="11" y1="490.932" x2="600.5" y2="490.932"/> <line id="Top_Line" stroke="#000000" stroke-width="0.5" x1="11" y1="488.932" x2="600.5" y2="488.932"/> </g> <line id="Line_Above" stroke="#000000" stroke-width="0.5" x1="10.5" y1="477.5" x2="600" y2="477.5"/> </g> <g id="Total_Cos"> <g id="Double_Line_3_"> <line id="Btm_Line_3_" stroke="#000000" stroke-width="0.5" x1="11" y1="444.932" x2="600.5" y2="444.932"/> <line id="Top_Line_3_" stroke="#000000" stroke-width="0.5" x1="11" y1="442.932" x2="600.5" y2="442.932"/> </g> <line id="Line_Above_6_" stroke="#000000" stroke-width="0.5" x1="10.34" y1="433.097" x2="599.84" y2="433.097"/> </g> <g id="SubTotal_Chicken"> <g id="Double_Line_2_"> <line id="Btm_Line_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="261.932" x2="596.5" y2="261.932"/> <line id="Top_Line_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="259.932" x2="596.5" y2="259.932"/> </g> <line id="Line_Above_1_" stroke="#000000" stroke-width="0.5" x1="7" y1="250.097" x2="596.5" y2="250.097"/> </g> <g id="total_Net"> <g id="Double_Line_1_"> <line id="Btm_Line_2_" stroke="#000000" stroke-width="0.5" x1="7" y1="130.932" x2="596.5" y2="130.932"/> <line id="Top_Line_2_" stroke="#000000" stroke-width="0.5" x1="7" y1="128.932" x2="596.5" y2="128.932"/> </g> <line id="Line_Above_3_" stroke="#000000" stroke-width="0.5" x1="7" y1="119.097" x2="596.5" y2="119.097"/> </g> <g id="Header_Underline"> <line id="Line_Above_4_" stroke="#000000" stroke-width="0.5" x1="8.34" y1="74.5" x2="597.84" y2="74.5"/> </g> <g id="Total_Controllable"> <line id="Line_Above_2_" stroke="#000000" x1="7" y1="498.066" x2="600.5" y2="498.066"/> <line id="Line_Under" stroke="#000000" x1="7" y1="509.329" x2="600.5" y2="509.329"/> </g> </svg> The above code is generated xml file, and i need to write a xslt transformation to get the fo file, for the PDF generation, how do I do it?? The doubt I have is, that I dont now how to represent the tags in xslt, and also I need to represent the line, path and text in the form of xslt. how can I do this any ideas, with really get me going... Actually I have to use a style sheet like this: <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" > <fo:layout-master-set> <fo:simple-page-master margin-right="1.5cm" margin-left="1.5cm" margin-bottom="2cm" margin-top="1cm" page-width="21cm" page-height="29.7cm" master-name="first"> <fo:region-body margin-top="1cm"/> <fo:region-before extent="1cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="first"> <fo:static-content flow-name="xsl-region-before"> <fo:block line-height="14pt" font-size="10pt" text-align="end">Embedding SVG examples - Practise</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after"> <fo:block line-height="14pt" font-size="10pt" text-align="end">Page <fo:page-number/> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block text-align="center" font-weight="bold" font-size="14pt" space-before.optimum="3pt" space-after.optimum="15pt">Embedding SVG</fo:block> <fo:block space-before.optimum="3pt" space-after.optimum="20pt"> <fo:instream-foreign-object> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="542px" height="505px"> <svg:title>A less cute tiger</svg:title> <xsl:for-each select="svg/switch/g/g/path"> <svg:g style="fill: #ffffff; stroke:#000000; stroke-width:0.25"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> <xsl:for-each select="svg/switch/g/g/g/path"> <svg:g style="fill: #ffffff; stroke:#000000; stroke-width:0.5; fill-rule=evenodd; clip-rule=evenodd; stroke-linejoin=round"> <svg:path> <xsl:variable name="s"> <xsl:value-of select="translate(@d,' ','')"/> </xsl:variable> <xsl:attribute name="d"><xsl:value-of select="translate($s,',',' ')"/></xsl:attribute> </svg:path> </svg:g> </xsl:for-each> </svg:svg> </fo:instream-foreign-object> </fo:block> <fo:block><xsl:apply-templates/></fo:block> </fo:flow> </fo:page-sequence> </fo:root>

    Read the article

  • k-means clustering in R on very large, sparse matrix?

    - by movingabout
    Hello, I am trying to do some k-means clustering on a very large matrix. The matrix is approximately 500000 rows x 4000 cols yet very sparse (only a couple of "1" values per row). The whole thing does not fit into memory, so I converted it into a sparse ARFF file. But R obviously can't read the sparse ARFF file format. I also have the data as a plain CSV file. Is there any package available in R for loading such sparse matrices efficiently? I'd then use the regular k-means algorithm from the cluster package to proceed. Many thanks

    Read the article

  • Octave: importing a large matrix in csv format

    - by Massagran
    I'm trying to import a matrix (about 80.000 rows) from a csv file to Octave. The obvious solution seems something like: load("-ascii","relative_directory/the_file.csv") or maybe renaming the file and trying: load("-ascii", "relative_directory/the_file.txt") Yet I keep getting the error: load: failed to read matrix from file "relative_directory/the_file.csv" or .txt without anymore details. Any tips are appreciated.

    Read the article

  • make a 3D spotlight cone matrix

    - by Soubok
    How to create the transformation matrix (4x4) that transforms a cylinder (of height 1 and diameter 1) into a cone that represents my spotlight (position, direction and cutoff angle) ? --edit-- In other words: how to draw the cone that represents my spotlight by drawing a cylinder through a suitable transformation matrix.

    Read the article

  • Trouble creating a button matrix in Interface Builder

    - by Jake
    Hi, I am trying to create a matrix of buttons in Interface Builder 3.2.1 but can not find anyway to do it. I read the question and answer posted here: http://stackoverflow.com/questions/1771835/how-to-create-a-nsmatrix-of-nsimagecell-in-interface-builder-in-10-6 But following Layout Embed Objects In, as suggested, I see only View and Scroll View as options, not Matrix. Have I missed something? Thanks.

    Read the article

  • Matrix "Zigzag" Reordering

    - by fbrereto
    I have an NxM matrix in Matlab that I would like to reorder in similar fashion to the way JPEG reorders its subblock pixels: (referenced from here) I would like the algorithm to be generic such that I can pass in a 2D matrix with any dimensions. I am a C++ programmer by trade and am very tempted to write an old school loop to accomplish this, but I suspect there is a better way to do it in Matlab.

    Read the article

  • Compact matlab matrix indexing notation

    - by AnnaR
    I've got an nxk sized matrix, containing k numbers per row. I want to use these k number as indexes to k-dimensional matrix. Is there any compact way of doing so in matlab or must I use a for-loop? This is what I want to do (in matlab-pseudo code), but in a more matlabish way. for row=1:1:n finalTable(row) = kDimensionalMatrix(indexmatrix(row, 1),... indexmatrix(row, 2),...,indexmatrix(row, k)) end

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >