Answered
How do I read a block of data from excel sheet and store it in an array?
YOu may proceed like this: clc ; clear all ; T = readtable('plot.xlsx') ; N = length(unique(T.(1))) ; % loop for each fli...

7 years ago | 0

Answered
Getting Error: Data must be numeric, datetime, duration or an array convertible to double.
YOu see t is double and y is of class sym. y has variable tau YOu have two options. Convert y into double by substituting pos...

7 years ago | 0

Answered
how to generate random points located on the surface of a hemisphere with its center at (2, 1, 3) and a radius of 6?
Use spherical coordinates,,,pick angles randomly and then convert into cartesian coordinates. Try this: N=500; r = 6; center...

7 years ago | 1

Answered
find index of points in meshgrid under the line
Read about knnsearch. You will get the the required/ nearest indices for the given line from the grid.

7 years ago | 0

Answered
How to get data every second from table that has variable sampling time
Read about interp1. time = [ 0 0.0010 0.0021 0.0031 0.0041 0.0053 ] ; torque = [ 0 1.22 1.32 1.32 1.42 1.60] ; dt = 0.0...

7 years ago | 0

Answered
matlab preallocation problem in for loop
fluid_HX = cell(length(t),1); for j=1:length(t) fluid_HX{j}=refprop(v(j),T_in(j),r410a); end

7 years ago | 0

| accepted

Answered
Extract column from table
Area = rand(7,1) ; BoundingBox = rand(7,4) ; T = table(Area,BoundingBox) ; iwant = T.(2)(:,2)

7 years ago | 1

| accepted

Answered
SVM classifier contour plot
Read about inpolygon. On knowing the corodinates of contour...you can seperate inside and outside points.

7 years ago | 0

Answered
How do i code this question?
Loop is not required. format long g n=(10:20)' ; c = factorial(2*n)./((factorial(n+1)).*factorial(n)); idx = mod(n,2)==0 ...

7 years ago | 0

Answered
odd and even index in cell
A={[113],[112],[42],[29],[113],[69],[86],[9],[0]}; B={[18],[14],[5],[39],[27],[11],[9],[7],[0]}; A(2:2:end) = {0} ; B(1:2:e...

7 years ago | 0

| accepted

Answered
Why is it wrong: e3=sym('sin(x)^2+cos(x)=0')
syms x e3 = sin(x)^2+cos(x)==0

7 years ago | 0

Answered
how to plot this ?
angle=linspace(0,2*pi,360)'; C = [0 0] ; R = 1 ; x=C(1)+R*cos(angle); y=C(2)+R*sin(angle); % x1 = R/2*cos(angle) ; ...

7 years ago | 1

Answered
Unable to find correct 2*theta by simple expression like 2*theta = atan (2 * A(1,2)/A(1,1) - A(2,2))
I think you messed up with a bracket......The expression shoul dbe: A = [1 2 ; 2 4] ; theta = atan (2 * A(1,2)/(A(1,1) - A(2...

7 years ago | 0

Answered
interpolation of 3d data
data = importdata('slice1_grid1.txt') ; x = data(:,1) ; y = data(:,2) ; z = data(:,3) ; %% Make grid m = 5000 ; n = 5...

7 years ago | 1

Answered
Plot function over two intervals
m = 500 ; x = linspace(-1,3,m) ; f = zeros(size(x)) ; f(x>=-1 & x <=0) = 1 ; f(x>=0 & x <2) = -1 ; plot(x,f)

7 years ago | 0

| accepted

Answered
Merging multiple csv files into one mat file
csvfiles = dir('*.csv') ; N = length(csvfiles) ; A = cell(N,1) ; for i = 1:N A{i} = csvread(csvfiles(i).name) end

7 years ago | 0

| accepted

Answered
how do i adjust the alignment of the columns?
I would suggest this: a = [1 0.74 0.56 0.66]; b = (1:25)'; c = b * a; T = table(c(:,1),c(:,2),c(:,3),c(:,4),'VariableNames...

7 years ago | 0

Answered
How to retrieve pixel coordinates from sentinel lat/lon arrays for a given location?
Read about scatteredInterpolant if you want to do by intpolation......Read about knnsearch if you want a neasrest value.

7 years ago | 0

Answered
Deleting data from a graphics
x = rand(10,1) ; y = rand(10,1) ; figure hold on for i = 1:10 h = plot(x(i),y(i),'.r') ; end title('delete some ...

7 years ago | 0

| accepted

Answered
How to compare each element of matrix having binary numbers?
idx = a ==b

7 years ago | 0

| accepted

Answered
How to get distinct markers for scatter plot while reading data from excel?
x = rand(100,1) ; y = rand(100,1) ; G = 4 ; % four groups idx = kmeans([x y],4) ; figure hold on M ={'+','*','s','...

7 years ago | 0

| accepted

Answered
Asking about resolution of coast.mat dataset
It is not uniform...it keeps changing......you may check it on your own..... load coast.mat unique(diff(long)) unique(diff...

7 years ago | 0

| accepted

Answered
How to rotate an image and its coordinate around a point in it?
Refer here: https://stackoverflow.com/questions/19684617/image-rotation-by-matlab-without-using-imrotate

7 years ago | 0

Answered
The radii of my binary pattern in respect to its boundaries
I = imread('Image.bmp'); % Remove white background around corners grayImage = min(I, [], 3); binaryImage = grayImage < 200; ...

7 years ago | 0

Answered
Finding arrays above threshold value
% Make some random data for demo A = cell(10,1) ; for i = 1:10 N = randperm(1000,1) ; A{i} = rand(N,1) ; end % ...

7 years ago | 1

Answered
how to know the column numbers of a matrix which contains values less than 50.
Let A be your row matrix. idx = A<50 ; idx = find(idx)

7 years ago | 0

| accepted

Answered
using nchoosek to gather possible combinations of data
N = length(x) ; idx = nchoosek(1:N,2) ; xi = x(idx) ; yi = y(idx) ; zi = z(idx) ;

7 years ago | 0

| accepted

Answered
How can I represent a map with different with color value
Read about plot.....it takes input (x,y) and color vector 1*3. figure hold on for i = 1:10 x = rand ; y = rand ;...

7 years ago | 0

Answered
compute iterations to calculate pairs of data that do not repeat
Read about nchoosek https://in.mathworks.com/help/matlab/ref/nchoosek.html

7 years ago | 0

| accepted

Load more