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

13 días ago | 0

| accepted

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

13 días ago | 1

| accepted

how to Search the documentation to create a 5-by-7 matrix with normally distributed numbers (instead of uniformly distributed numbers).

13 días ago | 0

| accepted

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

13 días ago | 1

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

13 días ago | 0

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

13 días ago | 0

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

13 días ago | 1

| accepted

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

13 días ago | 0

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

13 días ago | 0

| accepted

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

14 días ago | 0

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

14 días ago | 0

Export time series data as csv

14 días ago | 0

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

14 días ago | 0

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

14 días ago | 0

| accepted

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

14 días ago | 0

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,:)

14 días ago | 0

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

14 días ago | 1

You should use function step. step(G) Refer: https://in.mathworks.com/help/control/ug/plotting-system-responses.html

14 días ago | 0

| accepted

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

14 días ago | 0

| accepted

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

14 días ago | 0

| accepted

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

14 días ago | 0

image selection in an interface

14 días ago | 0

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

14 días ago | 0

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

15 días ago | 0

| accepted

Show Coastlines on Maps

15 días ago | 0

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

15 días ago | 1

| accepted

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]

15 días ago | 2

| accepted

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

15 días ago | 0

| accepted