Answered
Editing Legend/Plotting
Try: Mat_w = -.5:.5:.5; u = s\f; title('Case 2') hold on plot(Mat_w, u) xlim([-w,w]) legend('N=5','N=9', 'N=20');

5 years ago | 0

Answered
Unrecognized function or variable 'X'.
fun = @(x,y) exp(-2*x.^4+2*x.^2-x.*y.^1-y.^2) ; fsurf(fun)

5 years ago | 0

| accepted

Answered
reshaping data properly mesh grid
Let X be your data matrix of size 2000*4. h = X(:,2) ; w = X(:,3) ; nh = length(unique(h)) ; nw = length(unique(w)) ; h ...

5 years ago | 1

| accepted

Answered
how to Search the documentation to create a 5-by-7 matrix with normally distributed numbers (instead of uniformly distributed numbers).
Read about randn. https://in.mathworks.com/help/matlab/ref/randn.html

5 years ago | 1

| accepted

Answered
how to code a discrete signal
You need to have array x and initial value of y in hand first. Example: x = rand(100,1) ; y0 = rand ; n = length(x) ; y...

5 years ago | 2

Answered
Unrecognized function errors MATLAB
To compare two strings use strcmp. Read about it. prompt = ["input wet or dry:","What value do you want to find [time/thicknes...

5 years ago | 0

Answered
How to count the amount of markers in a figure?
x = rand(1, 10000); y = rand(1, 10000); minAllowableDistance = 0.05; numberOfPoints = 50; % Initialize first point. keeperX...

5 years ago | 0

Answered
How to Terminate a Loop After Reaching the Desired Value?
tol = 10^-5 ; % fix your tolerance value while abs(r(n+1)-r(n))>tol r(n+1)=L*r(n) end

5 years ago | 1

| accepted

Answered
First 10 Harmonics of Fundamental Frequencies of FFT plot
Use the function findpeaks. Have a look on the function max, sort.

5 years ago | 0

Answered
why does the command window show 'Unrecognized function or variable 'beta_est'.'? how to solve it?
Replace the line: syms bets_est; with syms beta_est; By the way you need not to use syms. You can straight away solve usin...

5 years ago | 0

| accepted

Answered
Label circles from imfindcircles
load centers.mat ; x = centers(:,1) ; y = centers(:,2) ; plot(x,y,'.r'); [x1,ii]= sort(x); y1 = y(ii); hold on...

5 years ago | 0

Answered
equalizing few matrices size in a cell
% demo data C{1} = rand(60000,1) ; C{2} = rand(65478,1) ; C{3} = rand(74578,1) ; % lengths of each cell array L = cell...

5 years ago | 0

Answered
Export time series data as csv
Read about writetable

5 years ago | 0

Answered
Save To Excel in different columns
writetable(A,'test.xlsx')

5 years ago | 0

Answered
how to apply threshold in this 8x8 numeric matrix?
A = [3 148 117 148 145 178 132 174 2 176 174 110 185 155 118 165 0 100 124 113 ...

5 years ago | 0

| accepted

Answered
Draw curves in matlab
txtfiles = dir('*.txt') ; N = lewngth(txtfiles) ; for i = 1:N load(txtfiles(i).name) ; wave=Book1(:,1); ...

5 years ago | 0

Answered
The Goldbach Conjecture states that every positive even integer can be written as the sum of two primes
a=28 ; primenos = primes(a) ; b = nchoosek(primenos,2) ; idx = sum(b,2)==a ; iwant = b(idx,:)

5 years ago | 0

Answered
dvide 500 random color to 80 different basket
N = 100 ; R = ones(N,1) ; B = 2*ones(N,1) ; Y = 3*ones(N,1) ; G = 4*ones(N,1) ; P = 5*ones(N,1) ; balls = [R; B; Y...

5 years ago | 1

Answered
Error using plot. simple code error please help!!
You should use function step. step(G) Refer: https://in.mathworks.com/help/control/ug/plotting-system-responses.html

5 years ago | 0

| accepted

Answered
How to read netCDF file ?
I will recommend you to use this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/46669-gebconetcdf...

5 years ago | 0

| accepted

Answered
How to extract the data (y-axis) for a given value ( x-value)?
load('IDA_Plot_CLUSTER_UPDATED.mat') PGA_Scale = [0.1:0.1:5]; figure(1) % to plot figure B % for tt = 1:60 % plot(MIDR(...

5 years ago | 0

| accepted

Answered
How to set different colors for branches when making 3d tree structure plotting from excel columns?
You need to use plot3 with the segments by mentining different colors. You need to use hold on. To name the segments, use text. ...

5 years ago | 0

Answered
image selection in an interface
Read about imcrop and imfreehand.

5 years ago | 0

Answered
Calculating the point of rotation for a 2D line from frame 1 to 3
The center of rotation will be the point of intersection of perpendicular bisectors. So, you need to find the perpendicular bise...

5 years ago | 0

Answered
graph not plotting anything
You need to use element by element by division i.e. ./ in the formula. theta = linspace(0,2*pi, 1000); d2b = -(a*cos(theta)*c...

5 years ago | 0

| accepted

Answered
Show Coastlines on Maps
Download the bathymetry data from this link: https://www.gebco.net/data_and_products/gridded_bathymetry_data/ to your required d...

5 years ago | 0

Answered
Extracting sequential values from a matrix taking into account two filter criteria
Symbol_Thres = 77.3500 ; Matrix = [0 1 0 1 0 1 0 1 0 1 0 1 0 1 0...

5 years ago | 1

| accepted

Answered
Using unique-function - show amount of times unique value was found
REad about hist. xbins = unique(Location); [counts,centres] = hist(Location,xbins); R = [centres counts]

5 years ago | 2

| accepted

Answered
Why this code gives error?
Use: plot(f,20*log10(FFT_abs/max(FFT_abs)),'color','b','linewidth',3);

5 years ago | 0

| accepted

Answered
Intersection between a 3D grid and flight path.
Read about knnsearch. flightPath = [-28.0206900000000,153.379210000000,12300; -28.0196195409287,153.378420816824,12275.04...

5 years ago | 0

Load more