From: Adam Sajna on
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
"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(&#8216;kta.txt&#8217;,&#8217;w&#8217;,&#8217;a&#8217;)
> fprintf(fid,&#8217;x = %10.3f \n&#8217;,x)
> fprintf(fid,&#8217;y = %10.3f \n\n&#8217;,y)
> fprintf(fid,&#8217;z = %10.4f \n&#8217;,z)
> fclose(fid)

a hint:
- use the correct apostrophe...
- also, use the correct permission format...

us