Respondida
2D contour plot considering the boundary of data
[x, y, z] = peaks(40); h = pcolor(x, y, z); h.EdgeColor = 'none'; % Now plot a mask hold on ps = polyshape([-1 -1 1 1], [...

casi 5 años hace | 0

Respondida
trying to plot multiple y axis
% data x = (0:.1:4)'; y = [cos(2*x) exp(x) x.^2 5*sin(4*x)]; % Plot on the left and right y axes using yyaxis hax1 = axe...

casi 5 años hace | 2

Respondida
How can i transfer a specific number in matrix to another number along the solution matrix??
x = [1,1,0,0]; % binary A = [-27, -10, -11, -25]; idx = find(x); [~, i0] = max(A(idx)); A(idx(i0)) = 0; A % A = [-27, ...

casi 5 años hace | 0

Respondida
my code is not running
This is my best guess. for year = 2009:2017 year_index = year-2008 % no space in variable names year_struct = load...

casi 5 años hace | 0

| aceptada

Respondida
indexing with isnan in multidimensional arrays
% A small matrix with nans a=randn(6, 3); a([2 11 13])=nan % idx idx = ~isnan(a) a(idx) So a(idx) is a colum matrix based ...

casi 5 años hace | 0

Respondida
uneven distributed points in polarscatter
polarscatter use radian instead of deg b=0:10:350; polarscatter(deg2rad(b),ones(size(b)),100,ones(size(b)),'filled')

casi 5 años hace | 1

| aceptada

Respondida
How to make complete graph from co-ordinates.
Show the node name, edge weight/distance, and node coordinates x=[0.3 ,5.6 , -8.4,6.4 ]; % These are my x-cordinates y=[4.6, 6...

casi 5 años hace | 0

| aceptada

Respondida
Why does plot(X,Y,'or') and plot(X,Y) give different results
The line plot draws line from one point to another point. The order of points is thus important. The 'or' option just plots th...

casi 5 años hace | 0

Respondida
How to plot heat map using MATLAB?
a = peaks(40); imagesc(a) colormap(hsv(512)) colorbar

casi 5 años hace | 1

| aceptada

Respondida
Is it possible to have function handles with optional arguments in Matlab
With anonymous function, you can take in the argument in workspace instead of function arguments. a = 1; b = 2; c = 1; f = @(x...

casi 5 años hace | 0

Respondida
How can I change the label for my elements with same name?
A = {'1_01';'1_01';'1_01';'1_02';'1_02'}; uA = unique(A); B = A; for i=1:length(uA) idx = find(strcmp(A, uA(i))); f...

casi 5 años hace | 0

| aceptada

Respondida
Write Without using loop
Not sure if you have given the correct equations: % Specify n, t and x n = 10; t = (1:n)'; x = randn(n, 1); % generate...

casi 5 años hace | 0

Respondida
FFT of quantized signal
Quantizing the ideal sinusoidal signal will produce a perodical signal, which may have some weird spectrum with 0 at some freque...

casi 5 años hace | 0

Respondida
Can u use filtfilt with structfun?
cheby_hp = designfilt('highpassiir', 'FilterOrder', 10, 'StopbandFrequency', 0.4, 'StopbandAttenuation', 80, 'SampleRate', 200);...

casi 5 años hace | 1

Respondida
Warning: Matrix is singular to working precision.
A=[1 1 1 1 0 ; 1 1 1 1 1 ; -1 -1 -1 -1 1 ;-778.8791468 -346.4077963 -149.2503011 -149.2503011 -163.019189 ; 16.28468788 201.1553...

casi 5 años hace | 0

Respondida
draw a function in the matlab
a=0; k = (-10:1:10)*2*pi; g = -2*pi./(4*pi^2+(a-k*1i).^2) +2*pi./(4*pi^2+(a+k*1i).^2) -(a-k*1i)./(36*pi^2+(a-k*1i).^2) +... ...

casi 5 años hace | 0

Respondida
plot for a numerical question
Assume x, k, a are real, a>0. Then . Similarly . Then your formula can be much simplified.

casi 5 años hace | 0

Respondida
how to create a sequence with percentage increments
n = 10; x = 3*1.1.^(0:n-1)

casi 5 años hace | 1

Respondida
How to integrate 3-dimensional numerical array into one dimension using Parallel Computing Toolbox?
Xd= distributed(X, 3) % distributed along 3rd dim Y = trapz(Xd, 3); % trapz support parallel processing for dis...

casi 5 años hace | 0

| aceptada

Respondida
Change eye diagram plot color into black on white
get a handle of the object and there are color properties for you to change. You may also need to change the Children object co...

casi 5 años hace | 1

Respondida
Could anyone help me how to have the legend as in the desired manner for two y axis.
Change the last line x=1:10; y1=rand(1,10); y2=rand(1,10); y3=rand(1,10); y4=rand(1,10); figure(1) [hAX,hLine1,hLine2] ...

casi 5 años hace | 0

| aceptada

Respondida
Cutoff frequency in graph
For cheby filter, the cut-off frequency is the edge frequency at which the magnitude response of the filter is –Rp (passband rip...

casi 5 años hace | 0

| aceptada

Respondida
zplane z or z-1
It's z-plane. See the following example, where all poles are inside the unit circle. [b,a] = cheby2(8/2,20,[1 5]/8); zplane(b...

casi 5 años hace | 1

| aceptada

Respondida
how can i multiply two large arrays of different sizes?
sigma = 0 %can set sigma to any positive integer number but choosing 0 to simplify things for now w = (0:2*pi:10*...

casi 5 años hace | 0

Respondida
Code Error Help Please
disp('2a-Part 1') f(-500,30,45,5,5); disp('2a-Part 2') f(-281,20,58,5,5); disp('2b-Part 1') f(-500,30,45,5,3.72); disp('2b...

casi 5 años hace | 0

Respondida
How I can modify the decimal numbers in a table's column?
a = randn(5,1) str = sprintf('%.1f\n', a)

casi 5 años hace | 1

| aceptada

Respondida
Filter timetable by month
%T_Departures_Jan = T_Departures.Date_Time(timerange('01/01/2020', 'months'),:); T_Departures_Jan = T_Departures(month(T_Depart...

casi 5 años hace | 0

| aceptada

Respondida
I need to save previous adjacent position of object movement
RxPre = [0 0]; % initial position for xx=1:1:no_of_moves_in_x for yy=1:1:no_of_moves_in_y Rx = get_Rx_position(R...

casi 5 años hace | 0

Respondida
Convert Time Given in Seconds to Minute, Seconds, Milliseconds
[h, m, s] = hms(duration([0 0 183.55])) % for sec and fractional sec si = floor(s) sf = s-si

casi 5 años hace | 0

Respondida
Packing perfcurve results into a structure
% avoid using Struct (similar to keyword struct) p=struct('X', X_, 'Y', Y_, 'T', T_, 'AUC', AUC, 'OPTROCPT', OPTROCPT); % Al...

casi 5 años hace | 0

| aceptada

Cargar más