Storage many same dimension matrixes to one matrix
Try to avoid eval. Use N-D array or cell array instead. n=10; %100000 x = zeros(4, 4, n); for i = 1:n x(:,:,i) = ifft...

17 Tage ago | 0

| accepted

The definition of layers in general literature is different from that of MATLAB layers. For example, the usual "convolution" la...

17 Tage ago | 0

| accepted

concatenate matrix with zeros function
The code "TxRxPairs = zeros(ants_pairs.Length,2)" is correct. It has the function name "zeros" followed by the arguments inside...

17 Tage ago | 0

Load multiple files to MATLAB without changing name manually
% list the files to be processed fn = dir("signal*.csv"); for ifile=1:length(fn) current_fn = fn(ifile).name; % [fil...

19 Tage ago | 0

| accepted

How can I find rank of matrix?
% Get the coefficient matrix of the system A = [ 7 6 9 2 7 1 3 2 2 1 5 5 6 4 ...

19 Tage ago | 1

Need help with Contour plot
x = [1 0.975744 0.294546 0.192422 0.155833 2 0.956922 0.172609 0.112765 0.089115 3 0.950648 0.131963 0....

19 Tage ago | 0

| accepted

Newton's method
https://en.wikipedia.org/wiki/Newton%27s_method R = 5; % input f=@(x) x.^3 - R; % f(x) = 0 df=@(x) 3*x.^2; ...

19 Tage ago | 0

| accepted

OnRamp Example Question/Troubleshooting
You should type "y = [7 9]" only. The second and third lines is the output of the command when you run it and they are not matl...

23 Tage ago | 0

Plotting of a cell array
a = rand(12,10)+4; b = rand( 5, 12)+3; c = rand( 4, 9)+2; d = rand( 10, 15)+1; M = {a,b,c,d}; % Cell Array p = 3; % for ho...

29 Tage ago | 0

How can I skip empty cells when averaging during a function?
load explained_balls whos for i = 1:length(explained_balls) %explained_balls{i} if isempty(explained_balls{i}) ...

29 Tage ago | 0

Index in position 1 exceeds array bounds.
It seems that your code works well. Can you show how the error occurs? x = randn(4, 5) F_ransac(x) function [epsilon, p, tol...

29 Tage ago | 0

plot the abs of fft. fb=1000; %frecuency of the square signal Tb=1/fb; fs = 999/Tb; %t=0:Tb/999:7*Tb; %time vector t=0:1/fs...

29 Tage ago | 1

| accepted

Hex to Num / Hex Cell Array
x ={'3A', 'F1', 'CF', '4C'} y = cellfun(@hex2dec, x)

29 Tage ago | 0

| accepted

How to write the string after a spesific point in cell array?
s = 'ASDASDDSA 123213213 ASDADASDA 18128, ASDSAD [ 123 123 123 12 3 123123 123 123]' t = regexp(s, '\[[\d\s]*\]', 'match')

30 Tage ago | 0

Unable to add coastlines to SST plot

30 Tage ago | 0

| accepted

How to apply STFT and convert it into Time frequency Image In MATLAB
load frame8PSK001 whos nfft=128; % doc spectrogram for more details spectrogram(frame, hamming(nfft), nfft/2, nfft, 'centere...

30 Tage ago | 0

how to plot histogram
load Xdata % whos figure; imshow(Xdata); unique(Xdata(:))' imhist assumes Xdata in the range of [0,1]. Therefore you have o...

30 Tage ago | 1

| accepted

Crack Detection Annotation Issue
1、The length of the crack I marked at the midpoint of the line segment: Use horizontal alignment plot([coord1(1), coord2(1)],[c...

30 Tage ago | 0

Growing eye matrix as per the size of eye
a = tril(repmat(eye(3), [3, 3]))

30 Tage ago | 1

| accepted

2 x axis log scale and 1 y axis
% generate some data dollarlost = logspace(4, 12, 81); p3 = 1e5./dollarlost; p2 = 1e4./dollarlost; p1 = 1e3./dollarlost; ...

30 Tage ago | 0

| accepted

Hi, I want to eliminate duplicates in a cell array in Matlab
T = {[1 2 5], [1 2 5], [1 3 5], [1 4 5], [2 4 5], [4 6]} Tu = T(1) for i=2:numel(T) toAppend = true; for j=1:nu...

30 Tage ago | 0

How can I create a correlation graph
% data matrix nv = 10; % number of variables ns = 80; % number of samples x = randn(ns, nv); % Correlati...

etwa ein Monat ago | 0

how to plot correlation matrix shown by colored circles?
% Generate R n= 6; r = magic(n); r = triu(r); r(r==0) = NaN % Plotting [xx, yy] = meshgrid(1:n, 1:n); scatter(xx, yy, r*2...

etwa ein Monat ago | 1

| accepted

How to converting complex numbers to absolute values?
a = readcell('sample data.csv'); a{1} = 'NaN' b = zeros(size(a)); for i=1:numel(a) if isnumeric(a{i}) b(i) = ...

etwa ein Monat ago | 0

Getting "Unrecognized function or variable 'reshape'" error!!
%reshape([1 2 3 4],:,1); reshape([1 2 3 4], [], 1) % use [] for auto computed size

etwa ein Monat ago | 0

create 256* 256 matrix with loop values 0 to 7
x = repmat(0:7, 256, 32)

etwa ein Monat ago | 0

| accepted

In the follow screenshot why do we use this filter to our signal I ?
You have a discrete linear system. You could find the system transfer function by analysing the system. It turns out to be a f...

etwa ein Monat ago | 0

Extracting data from confusion matrix fig
f = openfig('SqueezeNet-CM', 'visible'); h = findobj(f.Children(2).Children, 'Type', 'Text'); data = zeros(length(h), 1); for...

etwa ein Monat ago | 0