Risposto
How to reshape 3D matrix ?
% Generate data (using number 1,...48 to represent a,...V) Z = permute(reshape(1:48, [4 4 3]), [2 1 3]) % First permute the ...

circa 3 anni fa | 0

Risposto
How do I sort automatic variables in matlab?
You have N points, , n=1, ..., N. You want to compute the distance between any two points. So there are pairs altogeter, whi...

circa 3 anni fa | 1

Risposto
How to adjust the view of colorbar to be the same as contourf
You may want to create the colorbar yourself that attached to the data as follows: n = 50; x = 100*rand(n,n); % Add the custo...

circa 3 anni fa | 0

| accettato

Risposto
confusion during finding out the mean of a 3d vector
A 2-d example (applicable to 3d in principle). a=[1 2; 3 3; nan 4; nan nan] % mean of [1 2 3 3 4] after omitti...

circa 3 anni fa | 2

| accettato

Risposto
Applying Two Filters Simultaneously
Fs=24414; t=0:1/Fs:435.13; X=rand(size(t))+2; % random noise + DC %RawData; Wn=10; % high cutoff [b,a]=butter(5,Wn/(Fs/...

circa 3 anni fa | 0

Risposto
Time and GPS data processing
% Read data from file T = readtable('resultcopy.txt'); % Convert to datetime format T.Var1 = datetime(num2str(T.Var1, '%06d')...

circa 3 anni fa | 0

Risposto
Why is the Y axis still in linear scale after setting 'YScale' to 'log'?
The yaxis is indeed in log scale. However, the ylim is in a small range as set by ylim ([0.6 1.1]) so it looks approximately li...

circa 3 anni fa | 0

Risposto
Plotting the the acceleration data of the degree of freedom versus the time.
Make sure time and acc have the same size time =[0: length(acc)-1]*0.02; plot (time,acc,'r-');

circa 3 anni fa | 1

Risposto
How to input data in listbox
Here is the example from documentation of uilistbox: function selectlistbox fig = uifigure('Position',[100 100 350 275]); ...

circa 3 anni fa | 0

Risposto
How to model a channel with mesh
Use some 3D software (such as blender) to create the 3d model and then export to a format matlab can read (eg. stl). Otherwise,...

circa 3 anni fa | 0

| accettato

Risposto
How to display two dataset comparison in one map graph?
With the same map region, you can plot the difference of data. lat = linspace(10, 20, 11); lon = linspace(5, 15, 11); [latg, ...

circa 3 anni fa | 1

Risposto
How do i combine multiple cells into one
c1 = {rand(2), rand(2)} c2 = {rand(2), rand(2)} c3 = {rand(2), rand(2)} c =[c1; c2; c3]

circa 3 anni fa | 0

Risposto
Plotting in 3D from a table
'doc griddata' for more details. rng('default') xy = -2.5 + 5*rand([200 2]); x = xy(:,1); y = xy(:,2); v = x.*exp(-x.^2-y.^...

circa 3 anni fa | 0

Risposto
Seeking an efficient method for using 'scatter3' to create a 3D scatter plot of fixed receiver positions.
Try scatter3: t = 0:pi/5:4*pi; xt = sin(t); yt = cos(t); h = scatter3(xt,yt,t,40, t*30, 'MarkerFaceColor', 'b'); colormap(h...

circa 3 anni fa | 1

Risolto


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

circa 3 anni fa

Risolto


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

circa 3 anni fa

Risolto


Extract Built In Functions and Toolbox Functions from String or Function Handle
Find the Built-In functions and Toolbox functions in either a string or a function handle. Generate a string of alphabetized ...

circa 3 anni fa

Risposto
Xlabel in figure is only at center position when the figure is big
When you set the xlim and ylim as auto by default, they will change automatically when the axes is resized. So the position of ...

circa 3 anni fa | 0

| accettato

Risposto
How to divide a signal to a function?
The "function" has a value close to 0 and thus division by 0 (or small value) results in the big peak.

circa 3 anni fa | 0

| accettato

Risposto
Interpolation From A Table
You can use interp to do the task, which produce the value you want: clear clc Table = [0.04 28.96 1.0040 34.800 121.45 2415....

circa 3 anni fa | 0

| accettato

Risposto
How to find the exact value of the frequency by MATLAB?
x=[11500.2 11477.9 11417.3 11426.4 11413 11382.9 11375.1 11347.9 11351.1 11329.3 11318.9 11343.4 11360.7 11378.4 11414.2 11408.2...

circa 3 anni fa | 0

Risposto
Can anyone help me on implementing gaussian noise on an ecg signal? If you want i can share my code. The problem is gaussian noise is 0 always.
Fs = 1; L = 128; x = zeros(L, 1); % This can be your original signal sig = 1/abs(Fs); % std of Gaussian random noise ...

circa 3 anni fa | 0

Risposto
radial value in polar plot doesn't connect as intended
deg=0:30:330; max=[2 2.14 2 1.86 2.14 2.71 2.54 2.29 2.29 2.43 2 1.86]; min= [2.14 2.57 2.29 2.29 2.43 3 2.86 2.71 2.71 2.71 2...

circa 3 anni fa | 0

| accettato

Risposto
Error whenever I try to label axis
The code can be run as shown below. Try clear all before running the code. clc, close all figure % Choose POLAR or CARTESIAN...

circa 3 anni fa | 1

| accettato

Risposto
how to get an isodensity plot
[x,y,z] = peaks(25); % Use your data contourf(x,y,z)

circa 3 anni fa | 0

Risposto
Rotate signal around midpoint
Try detrend https://www.mathworks.com/help/matlab/ref/detrend.html?s_tid=doc_ta

circa 3 anni fa | 1

| accettato

Risposto
Specify value on a contour with a value that is not in the matrix, it is possible ?
Sure you can. % a is integer a=magic(6) % We specify the level as decimal number so it is not in the data a contour(a, [2....

circa 3 anni fa | 0

Risposto
Function 'fft' not supported for fixed-point conversion.
Is the following helpful? https://www.mathworks.com/help/fixedpoint/ug/convert-fast-fourier-transform-fft-to-fixed-point.html ...

circa 3 anni fa | 0

Risposto
Index of Array's column whose value is closest to Vector value for a given row
N = 20; A = 1 + 4*rand(N,1); % Generate column vector of N value from 1 to 5 B = [1:0.1:5]; % Generate line vector of 41 value...

circa 3 anni fa | 0

| accettato

Risposto
How to take number between two nested cell arrays
You can do the following (the code you gave above is NOT a nested cell): A = {{[27,28,30,31]},{[26,25,30]},{[33,29,31,27,28]}};...

circa 3 anni fa | 0

Carica altro