Answered
How do I store data to plot it from a summation?
function cosx = mycos(a,b) k = 0; term = 0; %term = zeros(1,121); x = zeros([],1) ; y = zeros([],1) ; while k < b %IDK ...

8 years ago | 0

Answered
Plot .grd file
pcolor(Y,X,Z) shading interp

8 years ago | 0

| accepted

Answered
Cumulative sum per ID
Say you have this data as a variable seperately....Let ID, var1, var2 be your variables. Do the following: [C,ia,ib] = unique...

8 years ago | 0

| accepted

Answered
How can I read informations of an ASCII header
fid = fopen('data.txt') ; count = 0 ; iwant = zeros(5,1) ; while 1 count = count+1 ; tline = strsplit(fgetl(fid)) ;...

8 years ago | 0

Answered
find length NaN segments
Read about isnan and nnz

8 years ago | 0

Answered
Why function displays one result, and how to stop it?
Call the function as below: [x1,x2] = kvadratna(1, 6, 5) ;

8 years ago | 0

Answered
Can anybody help this loop question?
Temp = 20; g = 0.1; x = 0.11; while(Temp > 0 && x ~= g) Temp = Temp -1 x = x -0.001 if abs(x-g)<=10^-3 ...

8 years ago | 0

| accepted

Answered
compare array and update the array
Student={ 'A';'B';'C'}; marks={100;100;100}; exam_name={'D';'A';'C';'B'}; new_marks={12;34;23;45}; [c,ia] = ismember(Stu...

8 years ago | 0

| accepted

Answered
how to read images in a folder with name as 1a,1b,1c,1d .......89c,89d
To pick images which are starting with 1 and having extensions jpg.....you may use files = dir('1*.jpg') ; You may run a lo...

8 years ago | 0

Answered
How can I get the area of each polygon of a voronoi diagram?
x = rand(10,1) ; y = rand(10,1) ; [v,c] = voronoin([x y]) ; figure hold on voronoi(x,y) A = zeros(length(c),1) ; for i ...

8 years ago | 0

| accepted

Answered
importing the data from mxd files
Refer here: http://kaplajon.github.io/mxdrfile/ http://www.public.asu.edu/~maigner1/final/

8 years ago | 0

Answered
Receiving error messages when trying to numerically integrate this function
h=6.626*10^-34 ; c=2.99792458*10^8 ; T=6000 ; k=1.381*10^-23 ; s =@(x) 1./(exp(c*h./(x*k*T))-1).*(2*pi*h*c.^2./(x.^5)); x1 ...

8 years ago | 0

Answered
how to to divide two images with different size ?
Read about imresize

8 years ago | 0

| accepted

Answered
plot a square into a square
x2 = x1+width ; y2 = y1+height ;

8 years ago | 0

| accepted

Answered
Plot latitude and longitude on google map
Refer this: https://in.mathworks.com/matlabcentral/fileexchange/27627-zoharby-plot_google_map

8 years ago | 0

Answered
plotting .mat file
a = 5.3142e+04 ; b = 5.3361e+04 ; c = 6.9351e+04 ; x = {'a','b','c'} ; y = [a b c] ; bar(y) set(gca,'xtick',1:3); ...

8 years ago | 0

Answered
Plotting a multivariable function
fplot(SF)

8 years ago | 0

| accepted

Answered
Calculate log return between the first and last observation in a day ?
fid = fopen('data.txt','rt') ; S = textscan(fid,'%s','delimiter','\n') ; fclose(fid) ; S = S{1} ; firstline = S{1} las...

8 years ago | 0

| accepted

Answered
How to get mask from boundary()
x = [1 2 3 4 3 2]'; y = [4 5 5 4 3 3]'; k = boundary(x,y); plot(x,y,'.r') hold on patch(x(k),y(k),'k')

8 years ago | 1

| accepted

Answered
How to refer to multiple separate columns?
B(:,[1 3]) Or B(:,1:2:3) Or, USe logicals idx = logical([1 0 1]) ; B(:,idx)

8 years ago | 1

| accepted

Answered
loop till condition met of swapping all repeated value of same column
A=[1 1 2 2 2 3 3 3 4 4 5 6 5 6 7 6 7 8 7 6 26 8 26 27 9 27 28 10 28 29 ...

8 years ago | 0

Answered
How can i plot all the values of y1 and y2 from for loop on x and y axis?
clc clear all y1 = zeros(100,100) ; y2 = zeros(100,100) ; for i =1:100 for j=1:100 y1(i,j)= (sqrt(i*i+4*j*j-3...

8 years ago | 1

Answered
Area Swept by Vector
It seems the swpt area is sector....have a look on area of sector.

8 years ago | 0

Answered
Index exceeds matrix dimensions
A = rand(5,1) ; % an array of size 5*1 A(1) % works A(5) % works A(6) % throws error The above array has only 5 eleme...

8 years ago | 0

| accepted

Answered
Simple for loop problem
eta = [1e-3:1e-2:9e-1]; m = length(eta) ; HN =5; DeltaEta = zeros(m,HN) ; for ii = 1:m for v = 1:HN DeltaEta(i...

8 years ago | 0

| accepted

Answered
how to find the indexing for the following code.
A=[1 2; 3 4; 5 6; 7 8; 9 10; 11 12; 13 14; 15 16]; C=size(A,1) B=1:3 for i = B D= ran...

8 years ago | 0

| accepted

Answered
How can we get the index of points that are inside a polygon?
REad about inpolygon

8 years ago | 0

Answered
How to match the matrix dimension ?
Val" are of 3600*1 double and "Main_signal" are of 1*720 How do you expect them to add? YOu need to do interpolation and get th...

8 years ago | 0

Answered
Cut a .JPG image
Select your region manually. X=imread('C:\Users\Utente\Desktop\DSC_0183.JPG'); [columns,rows,colors]=size(X); X2 = imcrop(...

8 years ago | 0

Answered
Plot array data with its values only inside polygon
Read about inpolygon. This will pick the values lying inside the given polygon.

8 years ago | 1

Load more