**Statistics**

RANK**51**

of 287,580

REPUTATION**3,604**

CONTRIBUTIONS

**3** Questions

**1,408** Answers

ANSWER ACCEPTANCE **
0.0%
**

VOTES RECEIVED**322**

RANK

of 19,416

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

how can I read and draw a plot and histogram from txt file on Matlab.

a = readtable("testdata.txt"); a.MESS_DATUM = string(a.MESS_DATUM) histogram(a.DD_10, 5) % 5bins

5 days ago | 0

recreating in matlab Butterworth Filter filter response

It seems that there is a confusion in s-domain and omega domain. The following is the Laplace Transform in s-domain. The plott...

2 months ago | 0

how can I calculate the nautical direction angle from Cartesian x- and y-component of velocity

vx = 10; vy = 10; v = sqrt(vx.^2 + vy.^2) theta = wrapTo360(90 - rad2deg(atan2(vy, vx))) % Earth coordinates, with ref to ...

2 months ago | 0

what is the map in this example?

"map" specifies the color of the image. load mri

2 months ago | 0

Hi I want to know how to do substract one data file from an another with a same resolution

depth = readmatrix("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1577092/depth.txt"); depth_00001 = readmatri...

2 months ago | 0

| accepted

How to change the color of a rigidbody visual.

See below for the question (1). I am not sure the part (2) and you may want to show your current code. body1 = rigidBody('body...

2 months ago | 0

How to change the color of a rigidbody visual.

body1 = rigidBody('body1'); jnt1 = rigidBodyJoint('jnt1','revolute'); tform = trvec2tform([0 1 0]); setFixedTransform(jnt1,t...

2 months ago | 1

| accepted

Matlab giving incorrect matrix multiplication :/

There is no problem for the matrix A and its inverse. Where do you get invA? A =[ 1 1 1 0 10 20 0 ...

2 months ago | 0

Is it possible to change scalar to numeric in workspace?

a = gpuArray(rand(3, 4, 2)); a(:,:,1) % use gather to convert gpu array to regular array b = gather(a(:,:,1))

2 months ago | 0

| accepted

Hai i am trying to 'pcolor plot' for Time for 12 hrs(x-axis) and height(y-axis) height size [103 X 1].can you help me?please

t = (1:12); h = (1:103); z = exp(-h'.*t/200); % data p = pcolor(t, h, z); p.EdgeColor = "none"; clear load(websave("...

2 months ago | 1

convert decimal to hex with 3 digit

dec2hex(-30) % this converts to hex in 2's complement hex2dec('E2') % this treats the hex as unsigned by d...

2 months ago | 1

| accepted

Cannot save a matrix into a csv file correctly

A = [0.001 9.86543 0.002 5.26811 0.003 4.9170] writematrix(A, "matrixA.txt"); type matrixA.txt

3 months ago | 0

Finding a definite integral

Assuming that u and k are constant vectors: u = randn(1, 100); k = randn(1, 100); syms x f = (u+k)*int(1.5*exp(-2*(1-x)), ...

3 months ago | 0

I need help with this code

figure; facesColor = {[1 0.5 0], [1 1 1], [1 0 0], [1 1 0], [0 0 1], [0 1 0]}; acesVertices(:,:,1) = [0 0 0; 1 0 0; 1 1 0;...

3 months ago | 0

Speed of the abs function

" squaring was a expensive operation" This is ture for VERY OLD cpu or some special purpose CPUs. In modern general purpose CP...

3 months ago | 2

How to draw a 3D surface with all the given discrete points？

load(websave("XYZ_data.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1559554/XYZ_data.mat")) whos figu...

3 months ago | 0

polar data 3d plot

r = linspace(0,100, 101)'; theta = linspace(0, 360, 61); t = 1; % single t point for simplicity here u = 1./r.*cos(2*pi*.05...

3 months ago | 0

How do I get this plot in Matlab?

% Define the general solution % [2 -1] and [1 2] are vectors. Use [ ]. X_general = @(t, c1, c2) (c1 * [2 -1] .* exp(-t)+ c2 *...

3 months ago | 0

Plotting a curve using two interdependent intervals

You need array division ./ instead of / v=0:373; td=0.5; ts=0.2; g=9.81; a=0; p=1.204; cx=0.35; cz=-0.05; ax=1.77; m=1240; u=1...

3 months ago | 0

Generate specific binary combination

You can put the dec2bin inside the loop so it won't be a big array. N = 4; for i=0:2^N-1 c = dec2bin(i, N) - '0' end

3 months ago | 1

why the real matrix becomes complex number when transfered to cell

You won't get complex output if FD is real. Check type of FD. S=15; %smaller N=6; FD = rand(N*S, S); FY=cell(S,S) f...

3 months ago | 0

How can I use various colors to fill the area under a normal distribution curve?

data = randn(8192, 1); h = histfit(data); pd = fitdist(data,'Normal') figure; x = linspace(-4*pd.sigma, 4*pd.sigma, 1001);...

3 months ago | 1

problem of using findpeaks

load(websave("19year.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1553817/19year.mat")) % It seems tha...

3 months ago | 1

pdeplot with same colorbar range

Use clim for each subplot. figure; subplot(3,1,1) pdeplot(model,"XYData",u(:,1),"Contour","on", "ColorMap","jet") clim([0 76...

3 months ago | 0

| accepted

issues with making a matlab firfilter

%[x, fs] = audioread('SunshineSquare.wav'); load handel.mat audiowrite("handel.wav", y, Fs); [x, fs] = audioread('handel...

3 months ago | 0

how to use writetable for one sheet?

inputData = [0.001 0.1; 0.003 0.1; 0.006 0.1; 0.1 0.09; 0.3 0.08; 0.5 0.07; 5 0.01; 7 0.005; ...

3 months ago | 1

| accepted

How to store each iteration of a loop as it's own varible.

syms k h g_dot T_inf L delta_x %symbolic varibles. T = sym('t',[8,1]); EQ = sym('eqn',[8,1]); n = 8; %for i = n-(n-1):1:n ...

3 months ago | 0

| accepted

how to get real frequency components using MUSIC compute frequency?

rng default n = 0:199; f1 = 0.257/2; f2 = 0.2/2; fs= 2; % fs (fs>2*max(f1, f2) % generate signal according to f1...

3 months ago | 0

A problem with xtick

It works here without problem. S=load(websave("LandauData.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files...

3 months ago | 0

| accepted

How to plot specified data points on a polar plot with curved lines, instead of straight lines

c_2 = [780.980150003248 900.818303825083 956.494860478838 855.216748671708 999.328305026861 784.311636929536 806.164595552563] ...

3 months ago | 0