From: Adam Sajna on 31 Jul 2010 05:57 I created a file with extension *.m When I try to use this file I obtain the following message: ??? Error: File: /home/user/plik.m Line: 5 Column: 11 The input character is not valid in Matlab statements or expressions. What is the reason that this in not working? The script have a form: load tka.txt x = tka(1) y = tka(2) z = x+y fid=fopen(‘kta.txt’,’w’,’a’) fprintf(fid,’x = %10.3f \n’,x) fprintf(fid,’y = %10.3f \n\n’,y) fprintf(fid,’z = %10.4f \n’,z) fclose(fid)
From: us on 31 Jul 2010 06:10 "Adam Sajna" <mionium(a)wp.pl> wrote in message <i30s1j$mjr$1(a)fred.mathworks.com>... > I created a file with extension *.m > When I try to use this file I obtain the following message: > > ??? Error: File: /home/user/plik.m Line: 5 Column: 11 > The input character is not valid in Matlab statements or expressions. > > What is the reason that this in not working? > The script have a form: > > load tka.txt > x = tka(1) > y = tka(2) > z = x+y > fid=fopen(‘kta.txt’,’w’,’a’) > fprintf(fid,’x = %10.3f \n’,x) > fprintf(fid,’y = %10.3f \n\n’,y) > fprintf(fid,’z = %10.4f \n’,z) > fclose(fid) a hint: - use the correct apostrophe... - also, use the correct permission format... us
|
Pages: 1 Prev: Matlab program doesn't run with all CPU cores Next: Converting irrational numbers to rational |