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

alrededor de 5 años hace | 0

| aceptada

Respondida
How to i convert complex single into complex double?
frame = single(3+4i); % Convert to double frame = double(frame) class(frame)

alrededor de 5 años hace | 0

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Respondida
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)

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

Respondida
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');

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

Respondida
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)

alrededor de 5 años hace | 1

| aceptada

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

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

alrededor de 5 años hace | 0

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

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

alrededor de 5 años hace | 0

| aceptada

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

alrededor de 5 años hace | 0

Respondida
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

alrededor de 5 años hace | 0

| aceptada

Respondida
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)

alrededor de 5 años hace | 0

Cargar más