Can some one help me why this command is not working to convert this vector into matrix form having each row should be three columns. So order of new matrix should be should be 5x3. i need this command so far i can use it for nxn matrix.
Ältere Kommentare anzeigen
G =[0 0 0 +0.2000i -0.2500i +0.0500i 0 0 0 -0.2000i +0.2500i -0.0500i 0 0 0]
??? Undefined command/function 'G2mat'.
Error in ==> fullloop at 49
[mat,padded] = G2mat(G,3)
>> [mat,padded] = G2mat(G,3)
??? Undefined command/function 'G2mat'.\
Can some one help me why this command is not working to convert this vector into matrix form having each row should be three columns. So order of new matrix should be should be 5x3. i need this command so far i can use it for nxn matrix.
1 Kommentar
Geoff Hayes
am 27 Aug. 2014
Rizwan - try to limit your question header to something simple and concise. There is no need to paste four lines of text into it, especially if you include that same text in your question body.
Antworten (4)
Geoff Hayes
am 27 Aug. 2014
Bearbeitet: Geoff Hayes
am 27 Aug. 2014
gAsMtx = reshape(G,5,3);
Azzi Abdelmalek
am 27 Aug. 2014
1 Stimme
G2mat is not a Matlab Built-in function
Cute Doll
am 27 Aug. 2014
0 Stimmen
1 Kommentar
Geoff Hayes
am 27 Aug. 2014
vec2mat is the name of the function. It has nothing to do with the name of the variable being vec. So in your case, you would just type
[gAsMtx,padded] = vec2mat(G,3);
The name of the function does not change.
Cute Doll
am 27 Aug. 2014
0 Stimmen
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!