Question

USING MATLAB Create a grayscale art image 1000px x 1000px using MATLAB. You must implement the...

USING MATLAB

Create a grayscale art image 1000px x 1000px using MATLAB. You must implement the use of grey scale. Be creative. You can earn up to 5 additional points.

Homework Answers

Answer #1

1)
%-------------The program is to fade the image as it move from left corner
%to right corner of the image. Left corner has 0 grayscale value(black) and right
%corner has 1 gray scale value(white)
clc
clear all
close all
size=1000;
pic=[];
p=0;q=0;
for m=1:size
for n=1:size
pic(m,n)=sqrt(((m/1000-p)^2+(n/1000-q)^2)/2);  
end
end
imshow(pic)
title('fading out grey scale image')

2)

clc
clear all
close all
pic=magic(1000); %It creates a magic square matrix with the range of 1 to 2^n
imagesc(pic) %Scales the image data to the full range of current colormap
colormap(gray(256)) % set the color to gray scale range of 0 to 255
axis equal %Equal axis in both x and y direction

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Create a python program that takes in an image from the user and puts the image...
Create a python program that takes in an image from the user and puts the image into matrices of red, green, and blue. Then use the equation Y = 0.2126R + 0.7125G + 0.0722B to convert the image to grayscale and output the grayscale image. You must only use the libraries numpy, matplotlib.pyplot, and math. You may not use pillow, openCV, sciPy, etc.
Using MATLAB: 1) Create three variables to hold the amplitude, phase shift, and number of cycles...
Using MATLAB: 1) Create three variables to hold the amplitude, phase shift, and number of cycles for your sinusoid. 2) Create a sinusoid that has 100,000 points with the amplitude, phase shift, and number of cycles specified in the variables. 3) Generate three test sinusoids: Amplitude = 5, Phase = pi/2, cycles = 5 Amplitude = 0.7, Phase = 0, cycles = 10 Amplitude = 8, Phase = -2pi/3, cycles = 4 Can someone help me with the exact formula...
MATLAB QUESTION: This must be completed using geometricrv. It is stated that as n becomes large,...
MATLAB QUESTION: This must be completed using geometricrv. It is stated that as n becomes large, the sample mean converges to the expected value: 〈?〉? → ?[?]. Use MATLAB to examine this convergence of a geometric random variable X. (a) (5 pts) Use geometricrv(0.1,100) to generate 100 sample values of X. Plot the sequence 〈?〉1,〈?〉2, … ,〈?〉100. Repeat this experiment five times, plotting all five 〈?〉? curves in the same figure. (b) (5 pts) Repeat part (a) for 1000 sample...
Write a script (must be titled “NumIntF”) in MATLAB that calculates the integration of function f(x)=cos(x)...
Write a script (must be titled “NumIntF”) in MATLAB that calculates the integration of function f(x)=cos(x) . exp(sin x), Using numerical integration method. When the user runs the script, he/she is prompted to input the lower and upper limits for numerical integration, both in radians, and your program outputs the integration result. You can use built-in trigonometric functions and the exponential function, but you are not allowed to use any built-in function to do the integration. You must use a...
**Please use MATLAB** 11)Function: Create a function that takes inputs “x” and “z” and generates any...
**Please use MATLAB** 11)Function: Create a function that takes inputs “x” and “z” and generates any random matrix of dimension “x” or “z”, whichever is larger. 12)Function: Create a function that takes a generic matrix, x, and finds the smallest value in the matrix. The function must work for matrices of any size or dimension. **Please use MATLAB** Also, please include code used for the function. I have tried several times but have been unsuccessful.
Matlab Create plot of the following density functions using x values between -10 and 10 with...
Matlab Create plot of the following density functions using x values between -10 and 10 with an increment of 0.02 -Normal cumulative distribution function with mu=1, sigma=1, mu=0, sigma=2, mu=0,sigma=1/2
Show all steps please Using Matlab: Generate a random signal ‘x’ with a length of 8000...
Show all steps please Using Matlab: Generate a random signal ‘x’ with a length of 8000 and sampling rate of 8kHz. Plot a section of the signal In the time domain. Is it possible to observe significant trends in the time domain signal? Plot the magnitude of the DFT of segments of ‘x’ of different lengths. Use a decibel scale for the vertical axis. What do you observe as the segment length increases? Use the Matlab function ‘periodogram’ to obtain...
USING MATLAB Create a series of if/elseif statements that check which coin is entered, and sets...
USING MATLAB Create a series of if/elseif statements that check which coin is entered, and sets the variable value to be the correct value of the coin. The following are the cases to consider: If coin equals ‘q’, then value equals 25 If coin equals ‘d’, then value equals 10 If coin equals ‘n’, then value equals 5 If coin equals ‘p’, then value equals 1 Otherwise, if the coin is none of the above, add a default else statement...
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x...
Using MATLAB Write a user-defined MATLAB function for the following math function: y(x)= (-0.2x^3 + 7x^2)e^-0.3x The input to the function is x and the output is y. Write the function such that x can be a vector (use element-by-element operations). (a) Use the function to calculate y(-1.5) and y(5). (b) Use the function to make a plot of the function y(x) for -2 ≤ x ≤ 6.
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in...
Using Matlab, evaluate ? = (? + 10) (?^5 + 1) for values of x in the range of -1 to 1 in step sizes of 0.1. Hence, plot y versus x. Could you also include the Matlab code and the associated screenshots?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT