Risposto
How do I speed down on video stream?
Add pause(0.1) in the code below: obj = setupSystemObjects(); tracks = initializeTracks(); % Create an empty array of tracks...

quasi 2 anni fa | 1

| accettato

Risposto
Contour Plotting form the text file for x and y coordinates values
T = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1103995/Plug%20-%20Copy.txt") F = scatteredInterp...

quasi 2 anni fa | 0

| accettato

Risposto
Change index of element in matrix with constraint
A = repmat(eye(6), 3, 1) % change 6 to 60 % if you need random permutation B = A(randperm(6*3), :)

quasi 2 anni fa | 0

Risposto
Convert an 8 bit image to 12 bit
I = imread("peppers.png"); % 8-bit image whos I1 = double(I)/256; % 8->12bit imwrite(I1, 'test.jpg', 'BitDepth'...

quasi 2 anni fa | 0

| accettato

Risposto
What is the minimum version of MATLAB on which .mlapp is able to run?
2016a https://www.mathworks.com/help/matlab/ref/appdesigner.html (see the version history)

quasi 2 anni fa | 0

| accettato

Risposto
I would like some help with coverting a matrix that is generated randomly to a binary matrix
d = rand(4,4) % random data y = zeros(size(d)); for i=1:size(d, 1) [~, idx] = sort(d(i, :)); % sort in asencin...

quasi 2 anni fa | 1

| accettato

Risposto
How to find the Intersection between curves and yline ?
load matlab lst = {'0.54','0.55','0.56','0.57','yline'} plot(m4) yline(0.1,LineWidth=1.5,LineStyle="--") legend(lst) fo...

quasi 2 anni fa | 0

| accettato

Risposto
I want to convert one time format into another type
str = '16-Aug-0022 04:39:55 PM'; t = datetime(str, 'InputFormat', 'dd-MMM-yyyy hh:mm:ss a'); % convert to datetime type t.Ye...

quasi 2 anni fa | 1

Risposto
find the start point of abrupt change in signal matlab
load triggerInput.mat plot(trigger) trigger = trigger(1:2e4); % select the 1st part %xlim([1 1e4]) %xlim([1500 250...

quasi 2 anni fa | 1

| accettato

Risposto
How to convert irregular daily data to annual data?
T = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1101770/pcr.xlsx"); T(T.Tonnes == 0, :) =[]; % ...

quasi 2 anni fa | 0

| accettato

Risposto
changing audio frequency to a constant
load handel.mat [p, q] = rat(2000/Fs) y2000 = resample(y, p, q); whos

quasi 2 anni fa | 0

| accettato

Risposto
Contour Plot when both x & y axis are in logscale
[x, y, z] = peaks; x = x+4; y = y+4; z=z+8; % make it positive figure contourf(x, y, z); colorbar xlabel('x'); ylabel...

quasi 2 anni fa | 0

Risposto
Filter a data table (timebased) based on another table (based on known lap intervals)
load data.mat load ends.mat for i=1:size(E, 1) idx = T.Time >= E.Start_time(i) & T.Time <= E.Stop_time(i); T2 = T(...

quasi 2 anni fa | 1

| accettato

Risposto
Creating vector using rand() function in a range
A = rand(1,10)*7

quasi 2 anni fa | 1

Risposto
Numerical differentiation of a 2-D data set along one dimension
A = randn(4,5) % Your image [Ax, Ay] = gradient(A)

quasi 2 anni fa | 0

| accettato

Risposto
Verify plane equation perpendicular to vector
Your code is correct. Here is a slighly simplified and improved(?) version. %% Plot approach vector approach_vec=[-0.61649099...

quasi 2 anni fa | 0

| accettato

Risposto
How to make a line plot with Jet colored lines?
zz1.zz1 = load('z1.mat'); zz1.zz2 = load('x2.mat'); cmp1 = jet(64); % Use colororder colororder(cmp1); plot(zz1.zz2.X...

quasi 2 anni fa | 0

| accettato

Risposto
How can I generate sinusoidal signal with a time-varying frequency?
fs = 100e3; % 100kHz sampling frequency ts = 1/fs; Time = ts:ts:84986*ts; % 0.84986 sec load('Freq.mat'); % 84.986 freque...

quasi 2 anni fa | 0

| accettato

Risposto
Remove row if its value is not different enough from the value in the row above it.
% Generate data latency = [1000 1010 1020 1800]'; dur = zeros(size(latency)); type = ones(size(latency)) * 256; T = table(...

quasi 2 anni fa | 0

| accettato

Risposto
sum of series of matrix
A = randn(5, 5, 99); B = zeros(5, 5, 33); for i=1:33 B(:, :, i) = sum(A(:, :, (i-1)*3+(1:3)), 3); end whos B

quasi 2 anni fa | 2

| accettato

Risposto
What is the equation used for taylor window function 'taylorwin'
The formulation of Taylor windown is a bit more complicated and not directly documented in "doc taylorwin". One reference is: ...

quasi 2 anni fa | 0

Risposto
Assign values of array to indices of another array
A = [1; 2; 3; 4]; B = [11; 22; 33; 44]; B(A) A = [0; 2; 3; 4]; C = zeros(size(A)); C(A>0) = B(A(A>0))

quasi 2 anni fa | 1

| accettato

Risposto
matlab coder report Size mismatch (size [0 x 0] ~= size [1 x 2])
... coord_list = zeros(n, m1); % m1 is the length of yy below I_list = zeros(n, m2); % m2 is the lenght of zz ... fo...

quasi 2 anni fa | 0

| accettato

Risposto
How to convert latitude and longitude of location to cartesian coordinates (x, y)?
First, you need a reference point. Second you have to assume that the posints are close enough to the reference points so that ...

quasi 2 anni fa | 0

| accettato

Risposto
how to use sprintf for xticklabel?
x = 0.1005:0.1:1.1005; y = randn(size(x)); plot(x, y) grid % for x tick format xtickformat('%.2f') % Conversion of array t...

quasi 2 anni fa | 0

| accettato

Risposto
extract numbers from text file
T = readtable("data.txt"); T=T(:, 2:end) x = table2array(T)

quasi 2 anni fa | 1

Risposto
How to convert negative numbers in parentheses (bank-formatted text) to numbers with minus sign?
xbank = [" (1,234)" "2,345,678" "(1,234.56)"] x = arrayfun(@bank2double, xbank) function x = bank2double(s) s...

quasi 2 anni fa | 0

| accettato

Risposto
Combine mat files into one, then combine all variables into one
filename = ["abc001.mat" "def002.mat"]; % list of the files in order variable1all = []; variable2all = []; for i=1:leng...

quasi 2 anni fa | 0

Risposto
there is nan in a column, delete the whole row
idx = isnan(c.lagpe); % find the index of nan c(idx, :) =[]; % remove the rows from table

quasi 2 anni fa | 0

| accettato

Risposto
How can I automate a process for n times?
J = [14 0 0 0 0; 15 0 0 0 0; 16 16 16 0 0; 22 22 0 0 0; 24 24 0 0 0; 25 25 25 25 25] Lr = size(J,1); for i = 1:Lr row = J...

quasi 2 anni fa | 1

Carica altro