Respondida
How can i generate spectrogram for a complex signal?
Use spectragrom which works both for real and complex data: a = randn(8192, 1) + 1i*randn(8192, 1) + cos(2*pi*0.25*(0:8191)'); ...

casi 5 años hace | 0

Respondida
How to remove quotation marks from each element of my array
gameboard = []; rows = 10; cols = 10; %Populating with nested loop gameboard = repmat('-', 10, 10); gameboard(1, :) = ('...

casi 5 años hace | 1

| aceptada

Respondida
How to use one data set to find the mean of another?
neighbors = [2,1,4,1,6,7,3,1]; height = [12.5,17,10,4,16,20.4,13.2,9.4 ]; % find the entries with 1 neighbour idx = neighbo...

casi 5 años hace | 1

| aceptada

Respondida
Convert 190x1 cell array into scatter plot?
% Data: 190x1 cell array and each cell contains {131x1}. ncells = 20; npoints = 50; for i=1:ncells data{i, 1} = randn(np...

casi 5 años hace | 0

Respondida
How to form a sphere with 1's in a 3D matrix
[m, n, p] = deal(10, 12, 14); [xg, yg, zg] = ndgrid(1:m, 1:n, 1:p); xc = round(m/2); yc=round(n/2); zc=round(p/2); % cent...

casi 5 años hace | 0

Respondida
Makking matrix in a for cycle
u=0:.05:1; v=0:.05:1; nu = length(u); nv = length(v); output = zeros(nu, nv, 3); for iu=1:nu for iv=1:nv x=[v...

casi 5 años hace | 0

Respondida
How to sum the values when they are bigger than 25, 50, 75, (conditional) and they are from the same group?
ID = {'1_A' ; '1_A'; '1_A'; '2_B'; '2_B'; '3_C'; '3_C'; '3_C'; '3_C'}; pct = [6.3875; 5.8813; 25.5219; 54.5052; 5.3287...

casi 5 años hace | 0

Respondida
Trouble in making video from frames, can anyone help?
If your image file names are well behaved, you can do a simple sorting of the file names: imgFile =dir('*.jpg'); imgFile = sor...

casi 5 años hace | 0

Respondida
How to place data in UItable second row
figure h = uitable; % create uitabl MAC={'6216', '23', 'BEC5'; '6216', '23', 'BEC5'...

casi 5 años hace | 0

Respondida
Vector loading with constraint and saving in vector
clc; clear all; [numbers,strings,raw]=xlsread('C:\Users\marett\Desktop\0310 FFT'); [row, col]=size(numbers); numArrays = row...

casi 5 años hace | 0

| aceptada

Respondida
How to read and scan a text file
s = fileread('SampleText.txt'); Number_of_vowels = vowelcounts(s); fprintf('Number of vowels: %d\n', Number_of_vowels); fun...

casi 5 años hace | 1

Respondida
Saving and appending for loop results from every run
If you want to attach the distance to the Data table you have read, then you can attach the distance vector for each country as ...

casi 5 años hace | 0

| aceptada

Respondida
How can I extract a submatrix based on rectangles drawn on a map?
% The fifth matrix map_seg5 = map; map_seg5(133:301, 138:265) = 0; map_seg5(1:133, 1:164) = 0; map_seg5(1:133, 165:end) = 0;...

casi 5 años hace | 0

| aceptada

Respondida
How to create a land/sea mask based on an XYZ bathymetry database?
% Assume the elevation data is E Mask = E>0;

casi 5 años hace | 0

| aceptada

Respondida
How to make animation of 2D plot
load('test.mat'); points = size(output,1); t=1:points; % use your t here xmin = 0; xmax = max(t); ymin = 0; ymax ...

casi 5 años hace | 0

| aceptada

Respondida
How to add a line to scatter plot
Date = datetime([1930:2020], 1, 1); DailyTMAX = randn(size(Date)); figure('Name','Daily TMAX'); hold on scatter(Date,Daily...

casi 5 años hace | 1

Respondida
What is a symbolic expression (syms) and how do I use this when doing differentiation in matlab?
If you have numerical recordings instead of fumula/expressions for input, the should use numerical diff. "findpeaks" may be als...

casi 5 años hace | 0

Respondida
Unable to perform assignment because the left and right sides have a different number of elements.
increments=[5 5 10] t0=0; t = zeros(size(increments)); sub_t = []; for i=1:3 %t(i)=t+increments(i) t(i)=t0+incr...

casi 5 años hace | 0

| aceptada

Respondida
how can i use sigma (summation ) in loop
% The input data mc = 10; a = randi(mc, 1); % alpha l = randi(mc, 1); % l b = sum((pi-a).*l)/(4*pi)

casi 5 años hace | 0

Respondida
Multiclass SVM Classifier testing
It will assign your image to one of the 3 categories.

casi 5 años hace | 0

| aceptada

Respondida
Velocity of a ball graph, Too many output arguments error
Put the function at the end of the script or in a different file. Add the out put "d=.." in your function header. v = 60; the...

casi 5 años hace | 0

| aceptada

Respondida
Exponential of very large number
Those number are beyond the scope of double numbers. You can try vpa. Alternatively, keep track of the mantisa and exponent yo...

casi 5 años hace | 0

Respondida
How to find unique matrix from given array and corresponding indexes?
A(:,:,1) = [ 20 20.05 19.95 20.05 ...

casi 5 años hace | 0

| aceptada

Respondida
Array from a script and area under the curve
a=0:0.1:15; % Three arrays for the three different vectors b=0:0.1:25; % Each array mesures to its alloted va...

casi 5 años hace | 0

Respondida
Vectorizing a multivariate function
Define , x = [x1;x2]; The x here is a matrix of 2 by n: z = x.' * x; Here z is matrix multiplication of (x.') and x. ...

casi 5 años hace | 0

| aceptada

Respondida
How can I extract specific rows from a data table?
% some random xyz coordinates xyz = randn(10, 3) % specify two points p1 = 2; % second point p2 = 7; % 7th point ...

casi 5 años hace | 0

| aceptada

Respondida
Does cross correlation indeed give correct signal leg value?
Correlation will give the correct signal delay estimate when signal to noise ratio is sufficiently high. Consider a signal x ...

casi 5 años hace | 0

Respondida
Speed up loading struct from file.
It seems that you have very regular data. Instead of using struct, you can simply use N-D numerical array which is faster and m...

casi 5 años hace | 0

Respondida
How to plot all curves according to their XY coordinates?
load d_data.mat load TWTi_data.mat load vp_data_plotting.mat vpmax = max(vp(:)); vpmin = min(vp(:)); vpave = mean(vp(:));...

casi 5 años hace | 0

| aceptada

Respondida
Resizing my figure table
A simple approach is to use normalized units for specifying position: S.pb(1) = uicontrol('style','push',... 'units','norm...

casi 5 años hace | 0

| aceptada

Cargar más