[X,Y] = meshgrid(1:3,10:14)
Even this one line of code errors out for me. I'm using 2007a. Any suggestions?
1. Don't name variables something like meshgrid.
2. Don't name your functions or scripts with the name
meshgrid.
To know which you have done, you would actually have
had to tell us what the error was. Silly question, I know
but it might have been of some help.
Or, just type this:
which meshgrid -all
It will tell you where the conflict lies.
John
I suggest you always post the error message when inquiring about an error.
theta = 5:15;
offset = 1.5:1:3.5;
[theta offset] = meshgrid(theta,offset);
I get this error:
??? Attempt to execute SCRIPT meshgrid as a function:
C:\Documents and Settings\Kim\Desktop\meshgrid.m
Error in ==> meshgrid at 3
[theta offset] = meshgrid(theta,offset);
Do you have any suggestions?
You have a file named meshgrid on your desktop. If you are trying to use the built-in Matlab function, also named meshgrid, you will have to get rid of the one on your desktop first. You can rename the file or move it to somewhere that Matlab cannot see it. That is why John said you shouldn't have a file named the same name as a built-in function.
[X,Y] = meshgrid(1:3,10:14)
I get this error:
??? Attempt to execute SCRIPT meshgrid as a function:
C:\Documents and Settings\Kim\Desktop\meshgrid.m
Error in ==> meshgrid at 1
Just rename (or delete) the above file.
Bruno
Hello Carp Fisher.....
here is yourmistake..
when u execute u pop up with this error
??? Attempt to execute SCRIPT meshgrid as a function:
C:\Documents and Settings\Kim\Desktop\meshgrid.m
SO which clearly shows that u have a file named meshgrid.m placed at ur desktop..
Just to me a favor... change the name of this file to any anything.. or according to my suggestion change its name to mshfisher.m
and now run ur code... U will be happy to see ur lines working...
and yeah dont forget to say Thanks in case it works...!!! :o)))
Happy Playing MATLAB..!!
Faraz
??? Attempt to execute SCRIPT meshgrid as a function:
C:\Program Files\MATLAB\R2008b\toolbox\matlab\elmat\meshgrid.m
I think I know how it came to be though. One day I opened the meshgrid function to look at the source of my error, but I mistakenly saved another program I had written in its place. So, I think the meshgrid function was no longer a viable script at that point.
I wish I could re-download the original meshgrid script. I just need this fixed.
Any useful help will go a long way.
Thanks,
Anyi
"Faraz Afzal" <faraz...@gmail.com> wrote in message <gov2pt$nnn$1...@fred.mathworks.com>...