Answered
How to get the rightmost root in the interval?
How about finding the intersection points of the given curve and the line y = 0 ? You can use this to get intersection points. ...

6 years ago | 0

| accepted

Answered
Read all files of a directory in a "human-way" order
YOu can use this: https://in.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort

6 years ago | 1

| accepted

Answered
How can I find all possible combinations of rows from two separate arrays?
s = [1 1 1 -1 -1 -1] ; s = nchoosek(s,3) ; A = [1 2 3 ; 4 5 6; 7 8 9] ; n = size(s,1) ; B = zeros(3,3,n) ; for i = 1:n...

6 years ago | 0

Answered
create a matrix with a for loop
T = 60; phi = cell([],1) ; count = 0 ; for t = 60:60:12940 count = count+1 ; phi{count} = [(n1(1,t+T)-n2(1,t+T))...

6 years ago | 0

| accepted

Answered
Plotting contours of a function
Fix the limits of x and y. Use linspace for this. Read about linspace. Make x, Y to a grid using meshgrid. Read about this. ...

6 years ago | 0

| accepted

Answered
How to solv newton Raphson method
You can search in google, you will get many links https://in.mathworks.com/matlabcentral/fileexchange/68885-the-newton-raphso...

6 years ago | 0

Answered
HOW to draw FRF graph and mode shape
data = xlsread("11bun_11.xlsx") ; f = data(:,1:3:end) ; f = data(:,1) ; amp = data(:,2:3:end) ; ph = data(:,3:3:end) ; ...

6 years ago | 1

| accepted

Answered
Function returning matrix instead of vector
Read about element by element operations. Repalce * with .*, / with ./ f=@(xf,xdata)xf(1)*(xf(4)+((xf(2)-xdata)./(xf(3)/2...

6 years ago | 0

| accepted

Answered
Moving, shrinking, expanding triangle by a fixed amount
Read about Affine Transofrmations. A =rand(3,2) ; % A random triangle patch(A(:,1),A(:,2),'r') % Move center for i = 1...

6 years ago | 0

Answered
how can i draw a 2 columns (as a time first raw is from 0 to 20 this in x axis and in y axis is from the 3rd column) and the 3rd is category
% Read the file file = "ex3data.txt" ; fid = fopen(file,'r') ; S = textscan(fid,'%f %f %s') ; fclose(fid) ; % Seperate...

6 years ago | 1

| accepted

Answered
Create a 3D patch faces matrix from vertices matrix
Are you looking for something like this? data = [-0.293 -0.404 0; -0.475 0.154 0; ...

6 years ago | 1

Answered
Generate multiple images with rectangle of specific dimension
Provide the four vertices of the rectangle. Read about patch. Use hold on to plot multiple different patches on the same figu...

6 years ago | 0

| accepted

Answered
How to delete data out of an interval
A = rand(1,100) ; % delete values lying in [0.5 0.75]; idx = A>0.5 & A<0.75 ; A(idx) = [] ; So in your case, as you have a...

6 years ago | 0

| accepted

Answered
Calculating with missing values?
doc nanstd Or fill NaN values using fillmissing and use std. Or have a look here: https://in.mathworks.com/matlabcentral/f...

6 years ago | 0

| accepted

Answered
Make a plt from a 4-D multi array variable from nc file
ncfile = "global-reanalysis-phy-001-030-daily_1591804259623.nc"; time = ncread(ncfile,'time') ; depth = ncread(ncfile,'dept...

6 years ago | 2

| accepted

Answered
For loop indexing error
ri = 40.34; rf = 40; Em = 3.5e-9; Ef = 1000e-9; z = linspace(0,0.34,12); n=1; E = zeros(12); r = zeros(12); for j = 1:12...

6 years ago | 0

Answered
Is it possible to extract the values with a vector of indices for each row without using the for statement from the matrix?
May be you are looking for A(b,:) The other A(:,b) will work, but in your case b has number 4 and in A there are only 3 co...

6 years ago | 0

Answered
How can I select multiple data points on a curve for calculating slope of each points?
The points which you have shown are peak points. To get the peak points you can use findpeaks. This will give you indices and va...

6 years ago | 0

Answered
How can i execute a function on a netCDF file with latitude and longitude, depth levels, and variables ?
Already your data is present in your required format. You see that your lat, lon are 5*2 size, and there are 50 depth points. ...

6 years ago | 0

Answered
How to find the diameter of a circle from an image ?
I = imread("circle6.jpeg") ; I1 = rgb2gray(I) ; [y,x] = find(I1~=255) ; C = [mean(x) mean(y)] ; % Center of circle ...

6 years ago | 0

Answered
How to select numbers in a cell array?
Let C be your 1*6 cell where each cell has 5*1 elements M = cell2mat(C) ; iwant = M(1,:) > M(2,:)

6 years ago | 0

| accepted

Answered
Pixel based image creating
m = 15; n = 15; [X,Y] = meshgrid(1:m,1:n) ; Z = 255*ones(m,n) ; idx = randperm(m*n,100) ; Z(idx) = 0 ; % pcolor(X,Y,...

6 years ago | 0

| accepted

Answered
Incorrect Logical Condition Statement
Leg = 'L'; %change between L and R if strcmp(Leg,'L') ; LEG = 'l'; else strcmp(Le...

6 years ago | 0

| accepted

Answered
Problem with integral function
Replace fun = @(v) (940/((24000./v)-(rr+(ad.*v^2)))); with fun = @(v) (940./((24000./v)-(rr+(ad.*v.^2))));

6 years ago | 1

| accepted

Answered
Hie, how can i solve this error, "Index exceeds matrix dimensions"
Try: N = numel(subset) ; subsetLabels = cell(N,1); for ii = 1:N subsetLabels{ii} = repelem((subset(ii).Description),subset...

6 years ago | 0

Answered
How to find the radius of a specific contour?
Read about contour, you can get the coordinates of the contour lines. Once you have the coordinates, you can get the center and ...

6 years ago | 0

Answered
Plotting various data on worldmap
Select the background world image with good quality. Read the image using imread, show it using image and fix the limits using...

6 years ago | 2

| accepted

Answered
Contour for Moving Object
x = 0:50:4000; y = 0:50:2000; [X,Y] = meshgrid(x,y); Power = 270; %Noise Power I0 = 10^-12; %basic intensity of noise N...

6 years ago | 0

| accepted

Answered
How to plot for this code to obtain the figure? Please!
Z1 = eta2(X1,Y1) ; Z1 is a complex matrix. USe either real, imag, abs to use surf. surf(X,Y1,abs(Z1))

6 years ago | 0

| accepted

Answered
Arrange data according to geographic regions I have set
You can load/ read the shapefile using shaperead. You can seperate the required region from a grid using inpolygon. You can ...

6 years ago | 0

| accepted

Load more