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

5 years ago | 0

| accepted

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

5 years ago | 0

Solved


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

5 years ago

Solved


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

5 years ago

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

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

5 years ago | 0

| accepted

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

5 years ago | 0

Answered
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

5 years ago | 0

| accepted

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

5 years ago | 0

Load more