please explain this error
    6 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    dav
 le 2 Oct 2014
  
    
    
    
    
    Réponse apportée : Deeptanu Datta
 le 25 Déc 2019
            I'm using matlab 2012a.
When I tried the following command it gave me an error.
Can you please explain it to me?
Thanks
Command:
max(-3/2, 7, 1.4)
Error using max
MAX with two matrices to compare and a working dimension is not supported.
0 commentaires
Réponse acceptée
  Mischa Kim
    
      
 le 2 Oct 2014
        
      Modifié(e) : Mischa Kim
    
      
 le 2 Oct 2014
  
      dav, I believe what you are trying to do is the following
 max([-3/2, 7, 1.4])
The values you want to find the maximum of need to be arranged in arrary form, that's why the square brackets.
Plus de réponses (1)
  Deeptanu Datta
 le 25 Déc 2019
        I tried running the code 
clc;
clear all;
close all;
x1 = [2 3 6 9 7 4 1 5 9 36 47 25 ];
[~, x3] = max(x1,[])
It gives an error "MAX with two matrices to compare and two output arguments is not supported"
But, when I write [~, x3] = max(x1,[],2) or  [~, x3] = max(x1), it works.
Please explain
0 commentaires
Voir également
Catégories
				En savoir plus sur Graphics Objects dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

