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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 1

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 1

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden