Community Profile

Contact

Top 1% contributor

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

accepted

1

Answered 2 years ago

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 ...

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...

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

1 Answers

0

Asked 2 years ago

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, :...

you can do it as follows(if you have square matrices of same size): A = round(rand(10,10)*10-5); B = round(rand(10,10)*2...

you can do it as follow: MaxValue = -Inf; row = 0; column = 0; for i = 1:size(K, 1) for j = 1:size(K, 2) ...

Load more