Answered
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)'); ...

4 years ago | 0

Answered
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, :) = ('...

4 years ago | 1

| accepted

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

4 years ago | 1

| accepted

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 1

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

4 years ago | 0

| accepted

Answered
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;...

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 1

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

4 years ago | 0

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

4 years ago | 0

| accepted

Answered
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)

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 0

Answered
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(:));...

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

Load more