How to translate math equations into matlab code

2 views (last 30 days)
Create a 256x256 image with 8-bit image intensity values, generate three circles in radii of 100, 50, 25 aligned to the center of the image. Fill intensity value 200 to the inner circle (r<25), intensity value of 100 between the first and second circle (25<r<50), intensity value of 50 between the second and third circle (50<r<100), and intensity value of 10 to the rest part of the image, calculate areas (number of pixels) corresponding to each of the regions. Output the image, its histogram and area in terms of number of pixels. The purpose of this question is to make sure you understand how to “translate” math equations into MatLab codes.
  2 Comments
Steven Lord
Steven Lord on 2 Sep 2021
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Rik
Rik on 10 Sep 2021
I recovered the removed content from the Bing cache (something which anyone can do (the process is similar for Google and Bing)).
If you want to avoid your teacher finding out you attempted to cheat, you shouldn't post on a public website. Just to make sure they will be able to find this page:
Create a 256x256 image with 8-bit image intensity values, generate three circles in radii of 100, 50, 25 aligned to the center of the image. Fill intensity value 200 to the inner circle (r<25), intensity value of 100 between the first and second circle (25<r<50), intensity value of 50 between the second and third circle (50<r<100), and intensity value of 10 to the rest part of the image, calculate areas (number of pixels) corresponding to each of the regions. Output the image, its histogram and area in terms of number of pixels. The purpose of this question is to make sure you understand how to “translate” math equations into MatLab codes.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Sep 2021
  1 Comment
Image Analyst
Image Analyst on 10 Sep 2021
Naomi said "I edited the question to be able to get a guidance on how to approach the problem. I am new at matlab and never my intention was to cheat."
Naomi, if you tag the post as homework, then the others are not supposed to give you full solutions. You can specifically ask them for hints, not full solutions, to drive that point home. Note that in my answer, I just gave you a hint on how to draw a circle and I did not solve it completely for you.

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!