Why Am I Getting an Undefined Function Error for 'double' in QR Factorization?

  • Thread starter Thread starter andrea141
  • Start date Start date
  • Tags Tags
    Error
Click For Summary

Discussion Overview

The discussion revolves around an error encountered in MATLAB related to the QR factorization of a matrix, specifically an "Undefined function or method" error when using the 'double' data type. Participants are seeking clarification and solutions regarding function calls and argument types in MATLAB.

Discussion Character

  • Technical explanation, Debate/contested, Homework-related

Main Points Raised

  • One participant describes receiving an error message when attempting to use a function 'qrfac' with a matrix input, indicating a potential issue with argument types.
  • Another participant suggests checking the documentation for 'qrfac' to ensure the correct argument types are being used, questioning whether the code is written in Fortran.
  • A third participant shares a similar error when using the function 'QR' with a matrix, indicating confusion over the function's case sensitivity.
  • A later reply advises using 'qr(Q)' instead of 'QR(Q)', emphasizing that MATLAB's built-in function names are case sensitive.

Areas of Agreement / Disagreement

Participants express differing views on the source of the error, with some focusing on argument types and others on function naming conventions. The discussion does not reach a consensus on the best approach to resolve the issue.

Contextual Notes

Participants have not provided detailed information about the specific implementations or definitions of the functions being used, which may affect the understanding of the errors encountered.

Who May Find This Useful

Individuals working with MATLAB, particularly those dealing with matrix factorization and function errors, may find this discussion relevant.

andrea141
Messages
1
Reaction score
0
Error message using 'double' ??

I'm writing a function with the algorithm to compute the QR factorization of the matrix A, when I go to use my function and input a matrix A I get the error message

Undefined function or method 'qrfac' for input arguments of type 'double'

and I have no clue what I'm doing wrong. Help please!

Andrea
 
Physics news on Phys.org


andrea141 said:
I'm writing a function with the algorithm to compute the QR factorization of the matrix A, when I go to use my function and input a matrix A I get the error message

Undefined function or method 'qrfac' for input arguments of type 'double'

and I have no clue what I'm doing wrong. Help please!

Andrea

You haven't provided much information, but from the error message, you are probably not providing the right types of arguments to qrfac. Look at the documentation for qrfac, and make sure that the arguments in your call to qrfac are the same types as it expects.

Is this fortran code you're writing?
 


I have identical problem on MATLAB 7.10.0 (R2010a):

Q =

0.4472 0 0 0 0
0.4472 1.0000 0 0 0
0.4472 0 1.0000 0 0
0.4472 0 0 1.0000 0
0.4472 0 0 0 1.0000

[QQ,RR,EE]=QR(Q)
? Undefined function or method 'QR' for input arguments of type 'double'.

any clue?
 


patiobarbecue said:
any clue?
Use qr(Q) rather than QR(Q). Matlab's built-in function names are case sensitive.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
Replies
4
Views
17K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
1
Views
18K
Replies
2
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
9K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K