X=(-5:.5:5)
Z=(-3:.5:3)
[x z]=meshgrid(X,Z)
The cutoff function that must delete the wanted elements is a circle with radius 1
(x-1)^2+(z-1)^2<=1
How can we manage a loop to put those elements 0 in the output data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think what you are looking for is this:
I hope this code is easy enough for you to understand what it does – if not you should take a programming class somewhere or sit down with a book.
Now, if the above answer is what you were looking for, take my word for it that gnovice’s answer (a mix of edit 2 and edit 3 actually) showed the way how to do this much smarter in MATLAB:
Hope this helps – otherwise I’m giving up ;-).