How to generate below matrix

3 Ansichten (letzte 30 Tage)
Vikas Saroha
Vikas Saroha am 6 Mai 2019
Beantwortet: John D'Errico am 6 Mai 2019
Matrix for one particular problem is shown below. But the position of coefficients may vary according to observations. How to start, please tell.
  1 Kommentar
Torsten
Torsten am 6 Mai 2019
Bearbeitet: Torsten am 6 Mai 2019
J = zeros(10,12);
J(1,1) = dD_AB_dxA;
J(1,2) = dD_AB_dyA;
...

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

John D'Errico
John D'Errico am 6 Mai 2019
Lets be serious here. You want to learn to create a general matrix, with elements in various places, that may, or may not, be where you indicate in the fuzzy picture.
So you need to learn to use MATLAB. After all, that is what MATLAB is about, matrices. But you don't know anything about MATLAB as far as we can tell. So you need to read the getting started tutorials. Do that FIRST. There you will learn to do things like how to create a matrix of zeros, thus most of your array. There you will learn about how to assign elements to a matrix, which is basically the rest of your question.
At some point, when you learn enough about MATLAB, you might learn to use tools like sparse, sub2ind, accumarray.
We are not told what the elements in this general array you show are. Are they symbolic? Numeric? Who knows? Only you. But that just means that you are the one who needs to learn MATLAB. We are not even told which toolboxes you have.
Basically, read the manual, as that will teach you everything you need to know. And since we have no idea how much you know already, for us to retype the entire manual is vastly more effort than anyone could do here.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by