Answered
could anyone help me to solve the issue for the following code.
Why you want to use a loop? i = 1:3 ; iwant = sum(i+1)

7 years ago | 0

Answered
function as arguement in matlab
function c = test(fun,a,b) c = fun(a,b) Call a = rand ; b = rand ; c = test(@tan2d,a,b)

7 years ago | 0

Answered
Assigning values from small grid into larger grid using nearest coordinates
Read about knnsearch. This will give you indices and you can easily replace the values.

7 years ago | 0

Answered
cell2mat error
C = [{'1 1 3 2' } {'2 3 5 2' } {'3 4 5 3' } {'4 1 4 3 '}] ; C = cell2mat(cellfun(@str2num,C,'UniformOutput',fa...

7 years ago | 2

| accepted

Answered
How do i convert my text file into a column array with the same format as it is in the text file ?
fid = fopen('TestLists.txt','r') ; S = textscan(fid,'%s','delimiter','\n') ; fclose(fid) ; S = S{1} ; S{1} % first line ...

7 years ago | 0

| accepted

Answered
Display results from t-test after loop
YOu can make them a matrix...why structure? p_value_A = zeros(10,3) ; p_value_B = zeros(10,3) ; for subject = 1:10 ...

7 years ago | 0

Answered
How to Convert a column with Char in Cell matrice to Number?
A = {'Time' 'Name' 'Location' 'Duration' 'Remarks' '100' 'John' 'Abc' '1000' 'Nill' '101' ...

7 years ago | 0

Answered
create an image from intensity value per pixel.
A = rand(512,512); imwrite(A,'myimage.png') ; figure imshow(A) figure imshow(imread('myimage.png'))

7 years ago | 0

Answered
temperature and gray level
I hope this demo code might help you: N = 100 ; x = rand(N,1) ; y = rand(N,1) ; s = rand(N,1) ; % Say intensity % A...

7 years ago | 0

Answered
How to read and visualize my lidar data?
Is this fine? fid = fopen('n008-2018-08-01-15-16-36-0400__LIDAR_TOP__1533151061547455.pcd.bin', 'r'); data = fread(fid,'singl...

7 years ago | 0

| accepted

Answered
Find row index of first 'True' value in column of table
Let T be your table. idx = contains(T.active,'True') ; iwant = find(idx) T(idx,:)

7 years ago | 2

Answered
How to draw a 3D surface plot with some disordering points?
load data.mat ; xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = griddata(x,y,z,X,Y) ; surf(X,Y,Z)

7 years ago | 0

| accepted

Answered
Create a 20x24 matrix with each individual column with random integers without duplicate
iwant = zeros(20,24) ; for i = 1:24 iwant(:,i) = randperm(20,20); end

7 years ago | 1

| accepted

Answered
how to convert video to image
vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv'); numFrames = 0; iwant = cell([],1) ; while hasFram...

7 years ago | 0

Answered
how can i plot circular orbit of satellite using app designer
Why you want to use an app? th = linspace(0,2*pi) ; R = 1. ; x = R*cos(th) ; y = R*sin(th) ; plot(x,y) ;

7 years ago | 0

| accepted

Answered
Area under the curve in blocs
Find it by intervel: x = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ...

7 years ago | 0

| accepted

Answered
how to find x value on this graph point name is find??
Read about min and max. It gives you indices of the respective v alue also. [val,idx] = max(y) ; iwant = [x(idx) val] ; ...

7 years ago | 0

Answered
How Can i solve this problem?
Check the classes of seg,gt. They should be of same class. Convert them to same class using double or uint8.

7 years ago | 1

| accepted

Answered
code for plot figure
lamda=0.2; mu=1-lamda; P1=mu^2/(mu+lamda)^2; P2=2*lamda*mu/(mu+lamda)^2; P3=lamda^2/(mu+lamda)^2; display(P1); display(P2)...

7 years ago | 0

| accepted

Answered
could anyone help me how to select the partitions in a random manner.
N = length(A) ; idx = randperm(N,1) ; iwant = A{idx}

7 years ago | 0

| accepted

Answered
how to find midpoint of a bounding box using co ordinates
Read about mean

7 years ago | 0

Answered
Derivative of a vector
USe gradient

7 years ago | 0

| accepted

Answered
How to train data using SOM and map the resukts on data
Hope this demo might help you: X = rands(2,1000); % some random input plot(X(1,:),X(2,:),'+r') net = selforgmap([2 2]);...

7 years ago | 0

Answered
How to plot a temperature colored map
load('A.mat') x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; nx = length(unique(x)) ; ny = length(unique(y)) ; X = reshap...

7 years ago | 0

| accepted

Answered
interpolation methods to calculate the value of y
x = [10 20 30 40 50]; y = [0.9530 0.7221 0.4510 0.6132 0.5518]; plot(x,y,'ob') xi=min(x):0.1:max(x); method=char('linear','c...

7 years ago | 1

| accepted

Answered
How can i create this equation in matlab?
red = img(:,:,1); blue = img(:,:,2); green = img(:,:,3); %T = zeros(size(img)); [rows, columns] = size(img); [x, y]= meshgr...

7 years ago | 0

Answered
center, major and minor axis of ellipsoid
% my Data Ith_MinT = rand(1,100) ; Can_MinT = rand(1,100) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...

7 years ago | 0

Answered
Mean value of array
Refer this: https://stackoverflow.com/questions/29040688/overlapping-sliding-window-over-an-image-using-blockproc-or-im2col

7 years ago | 1

Answered
3D surface plotting. Error (z must be a matrix)
x_length=0:50; y_length=0:200 ; [x_length,y_length] = meshgrid(x_length,y_length); Hyp1=sqrt((x_length.^2)+(y_length.^2)); ...

7 years ago | 0

| accepted

Answered
how to get the value of two variables with respect to fixed value.
A = 0:50 ; B = 0:50 ; S = [10 20 30 40 50] ; [A,B] = meshgrid(A,B) ; A(A>B) = NaN ; C = A+B ; % Get A<B but A+B = 1...

7 years ago | 0

| accepted

Load more