Please help me create simple function to convert celsius to fahrenheit and another for inverse?
    5 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Becky CNS
 am 25 Feb. 2018
  
    
    
    
    
    Beantwortet: Star Strider
      
      
 am 25 Feb. 2018
            Matlab keeps complaining about invalid syntax but I don't understand why. Errors keep arising mainly with the brackets saying they are missing but they are not, that there is a syntax error (it probably is) or it says a new line is needed between statements (why when I'm creating a function)?
At the moment I have a function>> function [F] = cel2fahr((C)*1.8+32)
of which celsius to fahrenheit is >> F = (C)*1.8+32;
I have tried it in this form >> function [F] = cel2fahr((9/5.*C)+32)
And with various combinations of brackets around the (C) in the formula and C in different places - I'm getting exasperated
I'd really appreciate any help
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Loops and Conditional Statements 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!

