Risposto
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], [...

quasi 3 anni fa | 0

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

quasi 3 anni fa | 2

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 0

Risposto
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')

quasi 3 anni fa | 1

| accettato

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 1

| accettato

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 1

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

quasi 3 anni fa | 0

Risposto
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) +... ...

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 1

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 1

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 1

| accettato

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 1

| accettato

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

quasi 3 anni fa | 0

| accettato

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

quasi 3 anni fa | 0

Risposto
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

quasi 3 anni fa | 0

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

quasi 3 anni fa | 0

| accettato

Carica altro