Answered
How can we find no of channels of the images of a datasets?
Let I be your image. if size(I,3) == 1 fprintf('Your image is Gray\n') elseif size(I,3) == 3 fprintf('Your image is...

7 years ago | 0

Answered
plot map with colorbar for scatter point
Let x,y,z be your column array data. scatter(x,y,10,z,'s','filled')

7 years ago | 0

| accepted

Answered
how to use for loop on both sides?
a = 1:4 ; b = 1:4 ; q = [i,j,k,l] ; w = [i,j,k,l] for loop1 = 1:4 for loop2 = 1:4 k_Global[q(loop1),w(loop2)...

7 years ago | 0

Answered
How ask data to the user?
Read about input prompt = 'Enter a value: '; x = input(prompt)

7 years ago | 0

Answered
How to convert data file from grid-format(lat,lon, time) into a table
x = 1:10 ; y = 1:5 ; [X,Y] = meshgrid(x,y) ; A = rand(5,10,10) ; % repeat spatial matrix X = repmat(X,1,1,10) ; ...

7 years ago | 0

| accepted

Answered
How to compare array values that meet condition?
REad about ismember.

7 years ago | 0

| accepted

Answered
renaming certain part of a file
files = dir('*.txt') ; for i = 1:length(files) V = str2double(regexp(files(i).name,'\d+','match')) ; s = ['BARI_Z_',...

7 years ago | 0

Answered
How can I plot a map of T2 of WRF output?
mymap=pcolor(longitude,latitude,temp'); You transpose the matrix and plot.

7 years ago | 1

| accepted

Answered
Perpendicular distance between points on line
YOu can use knnsearch. This will give you closed point in green curve to each point in red curve, as the it is the closest point...

7 years ago | 0

Answered
How to find distance around point
points = [109,380 ; 162,471 ; 201,536 ; 470,143 ; 575,391] ; % coor = [points ; points(1,:)] ; d = sqrt(sum(diff(co...

7 years ago | 0

Answered
Sum and Sort Values from Multiple Vectors
Time = [10 23 54 50] place = {'A' 'B' 'C' 'A'} place_unique = unique(place) N = length(place_unique) ; iwant = zeros(...

7 years ago | 0

| accepted

Answered
how should i plot these data?
data = xlsread('Book1.xlsx') ; x = data(:,1) ; y = data(:,2) ; plot(x, y); % a basic monochrome plot % Trick surfac...

7 years ago | 0

| accepted

Answered
How can I solve randperm error with words?
Tile = {'house', 'core', 'word', 'ask', 'question', 'horse', 'phone', 'eyes', 'hair', 'man'}; % Gives random arrangement X =...

7 years ago | 0

Answered
Extract data from CSV files
Read about xlsread, csvread, readtable functions.

7 years ago | 0

Answered
Dimensionality reduction on matrices with missing entries
[coeff,score,latent] = pca(mymatrix) here latent gives you variance of the principal components in decreasing order. You can pi...

7 years ago | 0

Answered
Merge Csv files.
csvfiles = dir('*.csv') ; N = length(csvfiles) ; iwant = cell(N,1) ; for i = 1:N iwant{i} = xlsread(csvfiles(i).name)...

7 years ago | 0

Answered
is there any idea on how to compare an .xls file and .csv file?
Load bot the data into MATLAB using xlsread. Get the common strings using ismemebr, contains

7 years ago | 1

| accepted

Answered
I want to convert 3D (6x4x5 double) data to 2D data
A = rand(2,2,3) ; out = reshape(permute(A, [2 1 3]), size(A, 2), [])'

7 years ago | 0

| accepted

Answered
Pca built-in function and how its works?
REad abut Singula Value DEcomposition. svd . And refer this for more clarity: http://www.cs.otago.ac.nz/cosc453/student_tutori...

7 years ago | 0

| accepted

Answered
how to draw bounding box?
Read about rect https://in.mathworks.com/help/matlab/ref/rectangle.html

7 years ago | 0

| accepted

Answered
formulation of square matrix
A = magic(3) ; B = cell(5,5) ; B(:) = {A} ; B = cell2mat(B)

7 years ago | 0

| accepted

Answered
Converting Photos to a Video
To convert images into frame follow: I = imread('peppers.png') ; imshow(I) F = getframe ; rgb = frame2im(F) ; imshow(r...

7 years ago | 0

| accepted

Answered
"Index in position 1 exceeds array bounds (must not exceed 1)." Error
Problem is with your BIP. It shoule be cXc matrix i.e it shoule be 2X2 for your inputs. You have entered it as 1X2, so the error...

7 years ago | 1

| accepted

Answered
how can I convert cell to double
load temp.mat ; iwant = cell2mat(temp')

7 years ago | 0

| accepted

Answered
How measure distance from center of the image to the object
YOu can measure the distance from center of the object to center of the image as below: I = imread('object_with problem.png'...

7 years ago | 0

| accepted

Answered
Match each element of one array with each element of other array without loops
Read about ismember, ismembertol and knnsearch.

7 years ago | 0

Answered
Converting a mat grid file to xyz
A = rand( [180,360,117) ; for i = 1:117 T = A(:,:,i) ; iwant = T(:) end

7 years ago | 1

Answered
How to connect dots on graph?
E1=[0.229711113281264;0.244475859375016;0.261230097656256;0.283730156249987;0.311849589843713;0.344379609374935;0.37915166015615...

7 years ago | 0

| accepted

Answered
Find overlap from two scatter plots
This problem can be solved with ease using knnsearch. Read about this function. YOu can get the nearest points in A for each poi...

7 years ago | 1

| accepted

Answered
creating an column vector of value which is obtained from 3rd position of multiple text files
A = rand(5) ; B = sort(A) ; iwant = B(3,:)

7 years ago | 0

Load more