Réponse apportée
I want to change the spectrogram time scale from minutes to seconds but I am unsure how.
You can change the xticklabel: h = gca; h.XTickLabel = string(h.XTick * 60); xlabel('Time (s)'); Alternatively, compute the ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to i convert complex single into complex double?
frame = single(3+4i); % Convert to double frame = double(frame) class(frame)

presque 5 ans il y a | 0

A résolu


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

presque 5 ans il y a

A résolu


Toeplitize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

presque 5 ans il y a

Réponse apportée
What is the code for generating X(k) from given X(n) = [1 2 3 4] using Fast Fourier Transform?
x = [1 2 3 4]; xfft = fft(x) y = ifft(xfft)

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Dispay information for Button in AppDesigner
Use 'Tootip' property. k = uibutton('Text', 'TestTooltp', 'Tooltip', 'Show some information when hover over') The documentat...

presque 5 ans il y a | 0

Réponse apportée
How to see values in heatmap when we use subplot
Either increase the figure size or reduce the font size, or both: figure('Position', [0 0 1024 768]); subplot(2,2,1); a=rand(...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
set same ylim for all subplot (plot yy)
%% yyaxis plot x = linspace(0,10); y = sin(3*x); yyaxis left plot(x,y) z = sin(3*x).*exp(0.5*x); yyaxis right plot(x,z)...

presque 5 ans il y a | 0

Réponse apportée
Change stem colour of particular values
x = (1:66); y = randn(1, 66); % your data figure; hold on stem(x, y, 'r'); i1 = [39 53 59]; stem(x(i1), y(i1), 'g');

presque 5 ans il y a | 0

Réponse apportée
How to orient multiple STL files the same way?
%% clc clear close all figure(100) subplot(131) model = stlread('wristband_1.0.stl'); %Reads STL trimesh(model); %Plots...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Using MATLAB and simulink, simulate the radiation pattern of an omnidirectional antenna
For ominidirectional response, it is a constant over directions. If you use phased array toolbox, you can plot the pattern: an...

presque 5 ans il y a | 0

Réponse apportée
How to find the percentage/number of pixels in each class of an indexed image?
Remove the nans before the line 'numberOfBins = max(fcls(:))'. This way the hist will not count on nans. fcls = fcls(:); fcls ...

presque 5 ans il y a | 0

Réponse apportée
How do I solve the double integral determined by the surface z=4x^2-y^2 over the rectangular region created by the coordinates (0,0),(4,0),(0,3) and (4,3) in the xy-plane?
You can do a numerical integration: z = integral2(@(x, y) 4*x.^2 - y.^2, 0, 4, 0, 3)

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How do I overlay worldmap outlines onto an imagesc plot?
You can use pcolorm instead of imagesc: % define and generate color plot x = [-180:5:180]; y = [10 5 0 -5 -10]; d1 = rand(5,...

presque 5 ans il y a | 0

Réponse apportée
how to interpolate for increasing - decreasing type of data set
Since tr1out is outside the range of theta1, you are doing extropolation as well. For the default interpolation method, the ext...

presque 5 ans il y a | 0

Réponse apportée
Make elements of matrix ones
A slightly simpler version: A = zeros(248,286); %create matrix of zeros A(20:60,[124:134 144:154 164:174]) = 1; A(70:120, [1...

presque 5 ans il y a | 0

A résolu


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

environ 5 ans il y a

A résolu


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

environ 5 ans il y a

A résolu


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

environ 5 ans il y a

A résolu


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

environ 5 ans il y a

A résolu


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

environ 5 ans il y a

A résolu


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

environ 5 ans il y a

A résolu


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

environ 5 ans il y a

A résolu


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

environ 5 ans il y a

A résolu


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

environ 5 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

environ 5 ans il y a

Réponse apportée
Summarize three-way table
It could be something like this: % Assume table (T) with these variables: year, region, type_of_patents, regional_share % Fi...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to input image in array?
You can use cell array so that each cell stores an image (of different size). im{k} = imageArray;

environ 5 ans il y a | 0

Réponse apportée
Index exceeds the number of array elements (0)
aux = (find(b(:,q) >= 255)); % This could be empty if ~isempty(aux) FinalArray (q) = [aux(1)]; end

environ 5 ans il y a | 0

| A accepté

Réponse apportée
array in power place minus known variable
Use .^ for power of an array of numbers. p = (10: .25: 15) I = 12.6 .^ (p-9.50 +2); plot(p,I)

environ 5 ans il y a | 0

Charger plus