Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
    5 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Teb Keb
 am 29 Sep. 2020
  
    
    
    
    
    Kommentiert: Teb Keb
 am 29 Sep. 2020
            t=linspace(0,1.5,100);
u1=1.75*cos(14.178*t);
u2=exp(-0.89*t)
u3=exp(-0.89*t)*(1.75*cos(14.178*t)
The first 2 expression of this is running my graph. However when I multiply them together as u3, it keeps saying it is invalid expression and might be missing a parenthesis at the end. I tried putting parenthesis at the end and even tried to get rid of the parenthesis, it still gives me error.
0 Kommentare
Akzeptierte Antwort
  James Tursa
      
      
 am 29 Sep. 2020
        You are missing an ending parenthesis, and also you probably need to use element-wise multiply:
u3 = exp(-0.89*t) .* (1.75*cos(14.178*t));
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Matrix Indexing 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!

