Learn the most important control and control categories that every architect and developer should include in their projects.
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
x385
Solutions
456
Contributors
MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.
Sign up to Post
Load Recent Content
Learn the most important control and control categories that every architect and developer should include in their projects.
[maxpeaks, idx] = findpeaks(10*log10(psdx),'MinPeakDistance',195,'NPeaks',4,'MinPeakHeight', -Inf, 'SortStr','descend')
Fs=160;
raw_acceleration = u;
N = length(raw_acceleration);
xdft = fft(raw_acceleration);
xdft = xdft(1:floor(N/2+1));
psdx = (1/(Fs*N)) * abs(xdft).^2;
psdx(2:end-1) = 2*psdx(2:end-1);
freq = 0:Fs/length(raw_acceleration):Fs/2;
plot(freq,10*log10(psdx))
grid on
xlabel('Frequency (Hz)')
ylabel('Power/Frequency (dB/Hz)')
raw_acceleration=
0.0021
0.0021
0.0021
0.0021
0.0021
0.0021
0.0021
0.0003
0.0003
0.0003
0.0003
0.0003
0.0003
0.0003
0.0003
0.0021
0.0021
0.0021
0.0021
0.0021
0.0021
0.0021
0.0021
0.0038
0.0038
0.0038
0.0038
0.0038
0.0038
0.0038
0.0038
-0.0002
-0.0002
-0.0002
-0.0002
-0.0002
-0.0002
-0.0002
-0.0002
0.0048
0.0048
0.0048
â€¦
Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.
size(vibration)
ans =
1024 1
vibration =
-0.0005
-0.0006
-0.0007
-0.0008
-0.0010
-0.0011
-0.0012
-0.0013
-0.0014
-0.0015
-0.0016
-0.0017
-0.0018
-0.0019
-0.0020
-0.0021
-0.0022
-0.0023
-0.0024
-0.0026
-0.0027
-0.0025
-0.0003
-0.0038
-0.0089
-0.0035
-0.0018
-0.0022
0.0004
0.0034
0.0063
-0.0023
-0.0046
-0.0022
-0.0043
0.0041
0.0025
0.0024
0.0037
0.0050
0.0060
0.0012
0.0058
0.0019
0.0008
0.0009
-0.0060
0.0004
0.0032
-0.0005
-0.0008
-0.0024
0.0021
0.0009
-0.0019
0.0003
0.0012
0.0069
0.0125
0.0209
0.0262
0.0184
0.0100
0.0058
0.0136
0.0181
0.0089
0.0058
0.0077
0.0045
0.0024
0.0015
0.0044
0.0095
0.0096
0.0087
0.0019
0.0053
0.0066
0.0033
-0.0010
0.0010
0.0116
â€¦
RGB=imread('CW5000.jpg');
s_wavelength=4; ; %use every 4th pixel for the perimeter calculation
I = rgb2gray(RGB);
threshold=.4 %black and white threshold
bw = im2bw(I,threshold);
imshow(bw)
bw = bwareaopen(bw,350);
se = strel('disk',2);
bw = imclose(bw,se);
bw = imfill(bw,'holes');
[B,L] = bwboundaries(bw,'noholes');
imshow(label2rgb(L, @jet, [.5 .5 .5]))
hold on
for k = 1:length(B)
boundary = B{k};
plot(boundary(:,2), boundary(:,1), 'y', 'LineWidth', 1)
end
stats = regionprops(L,'Area','Centroid','MajorAxisLength','MinorAxisLength')
for k = 1:length(B)
boundary = B{k};
A = size(boundary)
boundary2=boundary(s_wavelength:s_wavelength:A(1,1),:);
delta_sq = diff(boundary2).^2;
perimeter = sum(sqrt(sum(delta_sq,2)));
area2 = stats(k).Area;
area=polyarea(boundary2(:,1),boundary2(:,2));
metric = 4*pi*area/perimeter^2;
metric_string=sprintf('%2.2f',metric);
text(boundary(1,2)+0,boundary(1,1)+50,metric_string,'Color','k',...
'FontSize',12,'FontWeight','bold');
%text(boundary(1,2)+40,boundary(1,1)+100,metric_string2,'Color','c',...
%'FontSize',12,'FontWeight','bold');
%text(boundary(1,2)+30,boundary(1,1)+150,metric_string3,'Color','g',...
%'FontSize',12,'FontWeight','bold');
â€¦
Index exceeds matrix dimensions.
Error in cusum (line 36)
y = x1(:,c_y) - mean(x1(:,c_y));
Error in original (line 269)
[ckc,slc]=cusum(Ic(:,2)); %% PROBLEMA
clear all, close all
addpath '/home/rocco/Documents/MATLAB/code/function'
%
% figure(1)
% set(1,'units','normalized','position',[0.142187 0.484722 0.307813 0.447222],....
% 'name','Path','numbertitle','off');
% set(gca,'FontSize',11);
% figure(2)
% set(2,'units','normalized','position',[0.457031 0.484722 0.264063 0.447917],....
% 'name','Equivalent track','numbertitle','off');
% set(gca,'FontSize',11);
%
% figure(3)
% set(3,'units','normalized','position',[0.009 0.13 0.482031 0.806944],....
% 'name','Terrain estimation','numbertitle','off');
% set(gca,'FontSize',11);
%
% figure(4)
% set(4,'units','normalized','position',[0.00351563 0.0465278 0.214453 0.893056],....
% 'name','Path','numbertitle','off');
%% Load data
% First campaign january 2015
â€¦
clear all;
clc;
syms x y
y = -x;
z=int(y,x);
v=[0:0.1/19:0.1];
dr=0.1/20;
for i=1:20
x=v(i);
kk(i)=eval(y)*(dr);
end
R1=sum(kk(1,:));
x=0.1;
z1=eval(z);
x=0;
z2=eval(z);
R2=z2-z1;
Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.
385
Solutions
456
Contributors
MATLAB is a numerical computing environment and proprietary fourth-generation programming language. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python. Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.