Community Profile

Contact

Top 1% contributor

If you want to show RGB channels in there original color then you can do like it: img = imread('filename.png'); % Read imag...

4

Answered 3 years ago

Hi does anybody have a working MATLAB code for Iterative Fourier Transform Algorithm (IFTA) for design of beam splitting diffrac...

1 Answers

0

Asked 3 years ago

you can do it like this: names = {files.name}; str = {'Á', 'É', 'Í', 'Ó', 'Ú', 'á', 'é', 'í', 'ó', 'ú'}; strreplace =...

accepted

1

use xlabel as below: xlabel('A*R^(2/3) (m^(8/3))', 'Interpreter', 'none')

you can do it in a loop as follows: A = [0 0 0 0]; B = [0 0 0 0]; lim = 0.999; inc = 0.001; count = 1; tic ...

use legend(strcat('Some text', num2str(someValue)))

you can store labels for all of your items in a cell array of strings and then you can use this cell array of strings in place o...

you can do it as follows: figure(1); fill([x; flipud(x)],[y1; flipud(y2)],'g'), hold on, plot(x, y1, flipud(x), flipu...

Dear Icequeen, The following link will be quite helpful for you: <http://www.mathworks.com/support/solutions/en/data/1-D47WBX...

Dear Leonardo, here is the code for this problem: x_deg = input('Input angle in degrees: '); x = degtorad(x_deg); sum...

Dear Stamatis, here is code for converting cell array into a matrix: for i = 1:12 data{i} = rand(1, 69); % create ce...

Dear David, you can output iteration number and iteration values as follows: function [xn, iterations] = Newton (f, df, xi,...

Here is one alternate: V = 70; machine = [100 150 200 250]; t=0:0.5:10; for i = 1:numel(machine) road = V*e...

Dear Alex, Of course MATLAB can handle it. The main problem comes not with MATLAB but with the processing capacity as well as me...

Dear Zgrt, you can do it the following way: gray3=dct2(gray2); gray4=gray3(1:4,1:4); IDCT_Gray=idct2(gray4); h = f...

Dear Amit, here is the modified code: tic syms x1 x2 x3 a; f = x1^2+2*x2^2+2*x3^2+2*x1*x2+2*x2*x3; p=[1,1,1]; n...

Dear Khandu, you can insert NaN at missing location as follows: A_matrix = rand(122,20,30); [nmonths, nlat, nlon] = size...

Dear Behrad, here is the complete code for your problem: fid = fopen(filename); % Insert here the file name with complete f...

Dear Dav, here is the code to do it up to fifth order: syms a b x y y = (a + b * x)^(1/2); TaylorSeries = taylor(y); ...

Dear Naveedp, here is the code you can use for plotting: theta = -90:90; theta_rad = degtorad(theta); r = 1; eleva...

try this: [row, col] = find(ismember(K, max(K(:))))

2

Dear Shannon, maybe you can do as follows: count = 0; while count < 3 ShapeName = input('Enter shape name: ', 's'...

Dear Jonagorn, 3 is a number however '3' is a character. So when you try to get numeric value of a character then MATLAB convert...

*you can plot these shapes in the following two ways(you can choose better way you like):* %% Seashell [u, v] = meshgrid...

here is an example to repeat a matrix N times in the 3rd dimension a = rand(10); % your matrix b = repmat(a, 1, 1, 5); %...

Arti run this code and you will see the graph: Nde = 2.7*10^19; Nsdp = 1*10^20; lateralstraggle = 2*10^-9; seff = ...

mystruct=struct('val1',80); title(['Title for plot where struct value mystruct.val1 is equal to ', num2str(mystruct.val1)])...

try this: Tin=input('Input T'); D=5; t=0.362; E=2.9e07; ws=17.9148297590378; R=1448.88; alfa=1.96; h=R...

try this: x = [43.7347 43.7354 43.7368 43.7370 43.7371 43.7374 43.7373 43.7377 43.7383 43.7388 0 0 43.7403]; NGPSLongitu...

you can do it as follow: For example you have your data in variable *A* then use following line to do it: A(16:16:end, :...

Load more

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries