Risposto
How can I merge the values of one matrix into another matrix based on one column value?
A = zeros([7 4]); A(:,1) = 1104849000:60:1104849400; B = rand([3 4]); B(1,1) = 1104849000; B(2,1) = 1104849180; B(3,1) = 11...

quasi 2 anni fa | 1

| accettato

Risposto
Array indexing nested in a struct arrray
myTable(1).name='A'; myTable(1).data=[1:3]; myTable(2).name='A'; myTable(2).data=[4:6]; myTable(3).name='B'; myTable(3).dat...

quasi 2 anni fa | 0

| accettato

Risposto
How to mask the data of no information?
websave("two_targets.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1132000/Two_targets.mat"); load('two...

quasi 2 anni fa | 0

| accettato

Risposto
IFFT of signal after transfer functions have been applied
Your transfer function Tf likely has values of 0 and the division operation Y./Tf making Y_corr has inf values so that IFFT cann...

quasi 2 anni fa | 0

Risposto
Plot polar plot for AOA
ax = polaraxes; hold on x=[ 157.9530 -133.5950 179.8410 -105.8580 180.6610 -121.5060 186.8470 -113.7320 187.5210 -...

quasi 2 anni fa | 1

| accettato

Risposto
iir filter saturation problems
It seems that your implementation of filter is not correct and hencie make the iir filter not stable: for i = 7 : N BPF(i)...

quasi 2 anni fa | 0

Risposto
How should we evaluate the similarity of two graphs?
load ellipse_original load ellipse_estimation whos plot(ellipse_original(:,1), ellipse_original(:,2), 'r', ellipse_estimation...

quasi 2 anni fa | 0

Risposto
How to rotate axis by 180 degree?
x=[1;0;0]; y=[0;1;0]; z=[0;0;1]; quiver3(0,0,0,x(1),x(2),x(3),'Color','green','LineWidth',2,'MaxHeadSize',0.5); hold on; qu...

quasi 2 anni fa | 0

Risposto
How to draw with semiology in MATLAB?
Q = [16,32,64,128,256,512,1024]; y = [9 9 9 9 5 0 0]*0.25; y1 = [45 37 25 21 5 0 ...

quasi 2 anni fa | 0

| accettato

Risposto
finding dft without using fft
% If you want to compare fft and dft, it's better to write dft as a % function and then perform the comparision. x = cos(2*pi*...

quasi 2 anni fa | 0

| accettato

Risposto
Reading and plotting data
x = readtable("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1131005/Lab3.csv") x.('datetime') = datetime(x.ti...

quasi 2 anni fa | 0

Risposto
Remove Certain Values in Matrix
Vel = [1,3,6,22,25,33; 11,12,15,12,15,67; 1,32,21,4,25,3; 11,12,5,33,15,7; 11,32,6,2,25,33; 1,0,0,...

quasi 2 anni fa | 0

| accettato

Risposto
Hello I'm getting this warning "Variable 'x1' might be set by a nonscaler operator".
close; clear; clc; n = -5:5; A = 0.8; x1 = A.^n; x2 = A.^(-n); if all(x1 == x2) % use all here to ensure all element...

quasi 2 anni fa | 0

| accettato

Risposto
surface 3d plot
[gm,km] =meshgrid(0.1:0.01:0.5, 0.1:0.01:0.5); % 1st surface R2 = gm.*(7.5581+ (0.0813+km)./(0.1129+km)); surf(gm,km,R2, 'Ed...

quasi 2 anni fa | 1

Risposto
How can I discretize data by their sign?
A = [-2,-1,5,-10,7,3,-9,-12,11]; s = sign(A) s1 = [1 diff(s)~=0] y = cumsum(s1) % [1,1,2,3,4,4,5,5,6]

quasi 2 anni fa | 0

Risposto
Text file data segregation
type test.txt result = {}; fid = fopen("test.txt", "rt"); while ~feof(fid) i = fscanf(fid, "**DATA%d"); result{i} =...

quasi 2 anni fa | 0

Risposto
Find unique groups in table with members both before and after date
T=table({'Joe','Joe','Joe','Joe','Steve','Steve','Mary','Mary','Susan','Susan'}',... {'2022-02-03','2021-12-23','2022-08-01...

quasi 2 anni fa | 0

| accettato

Risposto
How can I join columns of an array without overlapping elements?
Not sure if this is what you intend to do: x = [1 1 0 0 0 0 0 0 0 0; 2 3 4 0 0 0 0 0 0 0; 0 1 1 1 0 0 0 0 0 0; ...

quasi 2 anni fa | 0

| accettato

Risposto
Read Multiple Files with While Loop
fn = dir("*.dat"); % or your file name pattern for i=1:length(fn) fn_c = fn(i).name % current filename to b...

quasi 2 anni fa | 0

Risposto
How to do a stem plot for a 4x100 vector value?
N=4; %Nodes number G=1.0; %Total traffic intensity p=G/N; %Traffic intensity per node...

quasi 2 anni fa | 0

| accettato

Risposto
Identifying if reaction times are 3 standard deviations away from mean
% rt=subject_data.rt; rt = randn(300, 1) * 3 + 1; % genate some random data mu = mean(rt) sigma = std(rt) idx = ab...

quasi 2 anni fa | 0

Risposto
How to create a symbolic vandermonde matrix in matlab?
N = 4; A = sym('A', [N, N]) v = sym('v', [N, 1]); A = v.^(N-1:-1:0) inv(A)

quasi 2 anni fa | 1

| accettato

Risposto
I'm definitely doing the exponential distribution wrong, am I?
% if X is uniform on [0,1] then −loge(X) follows an exponential distribution with parameter 1 N = 1e5; a=0; b=1; x = a+(b-a...

quasi 2 anni fa | 0

Risposto
Creating a piecewise function using for and if
% Here are some hints for your try % data set of 0:0.1:5 x = 0:0.1:5; % for loops over x for i=1:length(x) % if sta...

quasi 2 anni fa | 0

| accettato

Risposto
How to get the min and max values of a randomized matrix?
A = randi([0 128], [20, 20]) maxA = max(A(:)) minA = min(A(:))

quasi 2 anni fa | 0

| accettato

Risposto
Adding parameter to file name string when saving a figure using savefig or figsave
CHANNEL=1; dt = datestr(now,'yymmdd_HHMMSS'); % filename = sprintf("C15_rhs_CalADC_ch%i_%s_ac",CHANNEL,dt); % with ac % plot...

quasi 2 anni fa | 0

Risposto
Fixing Zoom on Matlab
ctrl-+ ctrl--

quasi 2 anni fa | 0

Risposto
How to use IF statements to find data greater than or equal to a certain amount
c = randn(20,1) % random data c1 = c(c>1)

quasi 2 anni fa | 1

Risposto
How to make the resolution for a spectrogram higher
load handel.mat tWaveform = y; Fs=44100; win_size = 0.02; % 20ms ws = round(win_size*Fs); noverlap = round(.75...

quasi 2 anni fa | 0

| accettato

Carica altro