tag 标签: matrix

相关博文
  • 热度 13
    2014-4-4 19:02
    1715 次阅读|
    0 个评论
    An excuse to make an LED matrix is always a good one. Instructibles user BrokenPipe says he was making a one-man version of the Disney Electrical Parade, but we all know that is just whatever happened to sound good enough at the time. It's OK, BrokenPipe. You can just tell us you wanted to make a wearable LED matrix. We think it's pretty cool!   As he explains in his step-by-step instructible, he used an LED matrix board designed by Modern Device. I couldn't find the exact LED driver board he used, but you're free to try to find it on their site. The 8x8 driver board was nowhere near large enough for what he wanted to do, so he ended up using a plastic tray with holes drilled in it. Ping pong balls act as diffusers, giving a very nice effect. You can see in the video below that the result is quite nice.   He wired the LEDs to his 8x8 driver board with a huge mess of wire, and used an Arduino to run the entire thing. He could have added a battery and stopped here, having a nice, fun display to show off. However, it wouldn't really be a parade without music, would it? He ended up including a laptop in the assembly that drives some external speakers as well as relaying commands to the Arduino to allow synchronised display. The IR remote you see in the video is a nice addition as well. Caleb Kraft, Chief Community Editor, EE Times  
  • 热度 18
    2011-3-14 17:11
    1868 次阅读|
    0 个评论
      A 3×3 matrix class? It's this character flaw that keeps me from being able to show you a completed 3×3 matrix class. Until recently, I've been stuck in one of those while-loops, and this time the ex-wife isn't here to assert the interrupt. I wasn't able to exit the loop until I began writing this column. I'd like to tell you what I have, and see what you think.   Clearly, a 3×3 matrix is not just any old matrix, even any old matrix with one dimension of three. It's a square matrix, and square matrices have special properties. For one thing, they have well-defined diagonals. A square matrix might, in fact, be diagonal. That is, its off-diagonal elements may all be zero. That's important, because a diagonal matrix has a trivial inverse: A square matrix might also be symmetric. If so, it can easily be transformed to a diagonal matrix. When I'm doing arithmetic with 3×3 matrices, they're almost always associated with coordinate rotations. For example, to convert a vector from a rotating coordinate system to a fixed one, I might write:   The matrix T is even more specialized than most. It's a rotation matrix , also called an orthonormal matrix . It has two very important attributes: Its determinant is 1, and its inverse is the same as its transpose:   This is very important, because a transpose of a 3×3 matrix is trivial to generate, whereas an inverse takes a lot longer. Also, because the determinant is known, we don't have to worry about the matrix being singular.   Finally, there exist more than one way to represent a rotation. The matrix is one choice, but not the only one, or even the best one. Other choices include Euler angles and quaternions. Euler angles are useful because people tend to be able to visualize the rotations better. But they're terrible choices for computations. Quaternions are the best and most compact, but good luck trying to visualize them.   Side Comment: You know you've arrived as a guru when you realize you can visualize a quaternion. Since it's a four-dimensional vector, that takes a little practice.   Decisions, decisions Now that I've given you the background, I can tell you why I was stuck in the while-loop. I know that I want to use 3×3 matrices mostly to effect coordinate rotations. But is that always going to be the case? Maybe not. And if it is, may I include constructors to convert a set of 3-vectors to a matrix? Or a set of Euler angles, or quaternions? If I demand that the matrix must be orthonormal, I'd better not try to create one from vectors.   For that matter, if I'm dealing exclusively with rotation matrices, maybe I need a function to make sure they stay orthonormal.   Here's why. When we're writing dynamic simulations involving rotations, we have to numerically integrate the elements that make up the state vector. If one of those elements is a rotation matrix (or equivalent structure), numerical roundoff errors can cause the matrix to drift away from its nominally orthonormal state. Those of us who write such simulations often include functions to re-normalize the matrix. It's not an easy thing to do, and doing it in an optimal way is even harder.   So a re-normalizing function is going to be almost a necessity for rotation matrices, but it's going to look really, really strange in a general-purpose matrix package—even one specialized to 3×3 matrices.   Of course, you know the conceptual solution to problems such as this: inheritance. Write a C++ base class for 3×3 matrices. Then define a derived class that specializes the class even further, to rotation matrices. Most of the operations will be the same, but a few functions, such as re-normalization, can be added, and the inverse function can be changed to invoke the simpler transpose function.   There's only one problem with this approach. A rotation in 3-space is a very unique thing, and the function that it performs is vastly different from the more generic matrix product. Heck, the member data for a "rotation matrix" need not even include a matrix. Rotations can also be described by a quaternion or a set of Euler angles.   And because there are three possible ways to describe the rotation, we're also going to need conversion functions to transform one set of descriptors to another.   FYI, a couple of years ago I wrote a library of Matlab functions capable of converting between angle, matrix, and quaternion representations. In doing so, I even surprised myself, coming up with killer algorithms that resulted in code that was tight, accurate, and bulletproof. I'll be sharing the algorithms with you soon.   Most people who work every day with rotation-related problems choose the quaternion, because it's more efficient to do so (no angles involved, and fewer elements to store). One has to ask: what's the point having a rotation matrix be a derived class of the 3×3 matrix, if it doesn't even hold a matrix anywhere in its structure?   Off and on, I've wrestled with questions like this many times. I can't say that I've ever come up with the definitive solution. More often, I find myself in need of that priority interrupt.   But this time, I've finally got the structure I need. The trick is, there should be no class called RotationMatrix . Instead, there's a class called Rotation . When applied to a vector or another matrix (or Rotation ), the operation may look like a matrix product, but the appearance is only superficial. Internally, a Rotation should be a separate type of object, worthy of its own class. Heck, it may not—and probably won't—even have a matrix as part of its member data. And in the best tradition of object-oriented programming, the way the rotation class is implemented should be transparent to the user. If I decide to change the internal representation from matrix to quaternion, that decision shouldn't matter one iota to users of the class.   When you think about it, the fact that I can define a rotation operation that looks like a matrix product is no different than defining products of integers or real numbers. I can declare:   int i, j, k; double x, y, z; Vector X, Y; Matrix A; Rotation R;   and write:   k = i*j; z = x*y; Y = A*X; Y = R*X;   Yes, the statements look the same and mean much the same. That's the elegance of operator overloading, and it makes life incredibly easy for the programmer. But we have no particular reason for a rotation object to inherit the '*' operator from a matrix, any more than we might have it do so from class int . Separating the class Rotation into a full-blown separate class is beginning to make a lot of sense.   Wrapping up I'm glad we had this little talk. So often in life, I've found that as I try to explain a knotty problem to someone else, I realize that I suddenly know the solution. That seems to be what has happened here. Thanks for listening.
相关资源
  • 所需E币: 1
    时间: 2023-4-23 23:46
    大小: 22.45MB
    上传者: EPTmachine
    G.W.Stewart-MatrixAlgorithms(1998,SocietyforIndustrialandAppliedMathematics).pdf
  • 所需E币: 1
    时间: 2022-5-6 09:52
    大小: 1.3MB
    AMatrixEquationApproachtotheDesignofLow-OrderRegulators(ShankarP.Bhattacharyya)
  • 所需E币: 0
    时间: 2022-5-4 02:29
    大小: 777.48KB
    ComputationalMatrixAlgebrawithMatlab-LectureNotes
  • 所需E币: 1
    时间: 2022-5-2 14:56
    大小: 7.06MB
    OptimizationofHierarchicalMatrixComputationonGPU
  • 所需E币: 1
    时间: 2022-5-2 03:02
    大小: 4.78MB
    LocalizationinMatrixComputations-TheoryandApplications
  • 所需E币: 0
    时间: 2020-12-19 23:34
    大小: 330.09KB
    上传者: samewell
    MatrixAPI的参考手册资料合集
  • 所需E币: 0
    时间: 2020-11-16 23:37
    大小: 343.74KB
    上传者: stanleylo2001
    MatrixAPI的参考手册资料合集 资源大小:343.74KB[摘要]MatrixAPIreferencemanual库是有友善之臂编写并维护的一个用C语言写成的类库,主要是给Matrix配件模块使用,集成库非常丰富,除了常用到的GPIO库,还包括I2C库、SPI库、UART库和软件PWM库等。由于友善推出的模块均以Matrix
  • 所需E币: 3
    时间: 2019-12-28 23:43
    大小: 230KB
    上传者: wsu_w_hotmail.com
    Embeddedsystemswhichrequireuserinteractionmustinterfacewithdevicesthatacceptuserinput(suchasakeypad,barcodereaderorsmartcardacceptor)aswellasdevicesthatdisplayinformationtotheuser(suchasLEDorLCDdisplays).Thisapplicationnote,usingtheMAXQ2000microcontroller,coverstheuseoftwosuchtypicaldevices-a4x4switchkeypadandanLCDdisplay……
  • 所需E币: 4
    时间: 2020-1-13 19:43
    大小: 269.31KB
    上传者: 2iot
    ieee_GeneralCouplingMatrixSynthesisMethodsforChebyshevFilteringFunctions_RichardJIEEETRANSACTIONSONMICROWAVETHEORYANDTECHNIQUES,VOL.47,NO.4,APRIL1999433GeneralCouplingMatrixSynthesisMethodsforChebyshevFilteringFunctionsRichardJ.Cameron,SeniorMember,IEEEAbstract―Methodsarepresentedforthegenerationofthetransferpolynomials,andthenthedirectsynthesisofthecorrespondingcanonicalnetworkcouplingmatricesforChebyshev(i.e.,prescribed-equiripple)lteringfunctionsofthemostgeneralkind.Asimplerecursiontechniqueisdescribedforthegenerationofthepolynomialsforeven-orodd-degreeChebyshevlteringfunctionswithsymmetricallyorasymmetricallyprescribedtransmissionzerosand/orgroupdelayequalizationzeropairs.Themethodforthesynthesisofthecouplingmatrixforthecorrespondingsingle-ordouble-termina……
  • 所需E币: 3
    时间: 2020-1-14 10:15
    大小: 662.29KB
    上传者: wsu_w_hotmail.com
    AdvancedcouplingmatrixsynthesistechniquesformicrowavefiltersIEEETRANSACTIONSONMICROWAVETHEORYANDTECHNIQUES,VOL.51,NO.1,JANUARY20031AdvancedCouplingMatrixSynthesisTechniquesforMicrowaveFiltersRichardJ.Cameron,Fellow,IEEEAbstract―Ageneralmethodispresentedforthesynthesisofthefolded-configurationcouplingmatrixforChebyshevorotherfilteringfunctionsofthemostgeneralkind,includingthefullyprescribedfinite-positiontransmissioncanonicalcase,i.e.,zerosinanth-degreenetwork.Themethodisbasedonthe”transversalnetworkcouplingmatrix,whichisable“toaccommodatemultipleinput/outputcouplings,aswellasthedirectsource……
  • 所需E币: 5
    时间: 2020-1-14 10:16
    大小: 413.82KB
    上传者: wsu_w_hotmail.com
    GeneralcouplingmatrixsynthesismethodsforChebyshevfilteringfunctionsIEEETRANSACTIONSONMICROWAVETHEORYANDTECHNIQUES,VOL.47,NO.4,APRIL1999433GeneralCouplingMatrixSynthesisMethodsforChebyshevFilteringFunctionsRichardJ.Cameron,SeniorMember,IEEEAbstract―Methodsarepresentedforthegenerationofthetransferpolynomials,andthenthedirectsynthesisofthecorrespondingcanonicalnetworkcouplingmatricesforChebyshev(i.e.,prescribed-equiripple)lteringfunctionsofthemostgeneralkind.Asimplerecursiontechniqueisdescribedforthegenerationofthepolynomialsforeven-orodd-degreeChebyshevlteringfunctionswithsymmetricallyorasymmetricallyprescribedtransmissionzerosand/orgroupdelayequalizationzeropairs.Themethodforthesynthesisofthecouplingmatrixforthecorrespondingsingle-ordouble-termina……
  • 所需E币: 4
    时间: 2020-1-16 12:22
    大小: 1.62MB
    上传者: 238112554_qq
    RandomMatrixTheoryandWirelessCommunicationsRandomMatrixTheoryandWirelessCommunicationsAntoniaM.TulinoDept.IngegneriaElettronicaedelleTelecomunicazioniUniversitadegliStudidiNapoli”FedericoII”Naples80125,Italyatulino@ee.princeton.eduSergioVerduDept.ElectricalEngineeringPrincetonUniversityPrinceton,NewJersey08544,USAverdu@princeton.eduFoundationsandTrendsTMinCommunicationsandInformationTheoryPublished,soldanddistributedby:POBox1792600ADDelftTheNetherlandsTel:+31-6-51115274www.nowpublishers.comsales@nowpublishers.cominNorthAmerica:nowPublishersInc.POBox1024Hanover,MA02339USATel.+1-781-985-4510Printedonacid-freepaperISSNs:Paperversion1567-2190;Electronicversion1567-2328c2004A.M.TulinoandS.VerduAllrightsreserved.Nopartofthispu……
  • 所需E币: 4
    时间: 2020-1-6 13:14
    大小: 31.53KB
    上传者: 238112554_qq
    48*16videocrosspointiceliminatesexternalmux-amps……