Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How do i create this kind of matrix?

1 Ansicht (letzte 30 Tage)
Derick Wong
Derick Wong am 23 Dez. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Given a scenario where the matrix is given as shown,
g=[X1 Y1; X2 Y2] and
p=[Q1 P1; Q2 P2]
There is a need to produce a matrix that becomes
result=[X1-(X1-0+Q1) Y1-(Y1-0+P1); X2-(X2-Q1+Q2) Y2-(Y2-P1+P2)]
How do I get such matrix given that it has n x m rows and columns?
  3 Kommentare
Derick Wong
Derick Wong am 24 Dez. 2013
Means result=[X1-(X1+Q1) Y1-(Y1+P1); X2-(X2-Q1+Q2) Y2-(Y2-P1+P2)]
dpb
dpb am 24 Dez. 2013
Say what????

Antworten (1)

Image Analyst
Image Analyst am 24 Dez. 2013
First of all, g is not involved in the result at all because it subtracts out. Then the result would be something like
result = [p(1,:);diff(p)]

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by