Answered
How to recenter a circle?
If you know Radius and center of circle, you can draw using: R = 2. ; % say R is 2 C = [0. 0.] ; % Let center be origin ...

6 years ago | 1

| accepted

Answered
Condition for choosing function
if max(a)<10 CL = fun1(a) ; else CL = fun2(a) ; end

6 years ago | 0

| accepted

Answered
Restructure column vectors into matixes
Let dates be your date and A be your column vector whcih you want to reconstruct. [C,ia,ib] = uniqur(dates) ; % if this do...

6 years ago | 0

| accepted

Answered
How to plot this function
x = -100:0.1:100; y = sin(pi*x/2)./(x*pi); y(x==0) = 1/2 ; plot(x, y);

6 years ago | 0

| accepted

Answered
summation of limited matrix's rows according to selected row's index
If you have a row number n, you can access two rows above and two rows below to n, using: iwant = (n-2):(n+2)

6 years ago | 1

Answered
how do i plot a 3d function and a 2d curve together?
m = 100 ; n = 100 ; x = linspace(-1,1,m) ; % define your range of x y = linspace(-1,1,n) ; % define your range of y [X,...

6 years ago | 0

| accepted

Answered
how to plot data associated with a certain value?
If A is 2209X25 matrix with PRN as second column. PRN = A(:,2) ; % Pick second column idx = PRN==6 ; %Get indices of 6 i...

6 years ago | 0

| accepted

Answered
Fill inside a polygon with a color
It happned because, your region have multiple regions inside and they have NaN's. shfile = "Lakes/lakes.shp" ; S = shaperead...

6 years ago | 2

| accepted

Answered
RGB images 3 dimensional??
RGB image will be a 3D matrix.....it will be of size m*n*3. It has three color channels. You can seperate them using: I = im...

6 years ago | 0

| accepted

Answered
How do I plot an array// text file?
y = load(filename) ; x = (1:length(y))' ; % making it a column as y is a column plot(x,y) Without using x also you can str...

6 years ago | 0

| accepted

Answered
how to plot all the data point in a for loop
No loop needed: w = 1:100 ; lambda = 1./w; g1 = (w.^2.*lambda.^2)./(1+w.^2.*lambda.^2); g2 = (w.*lambda.^2)./(1+w.^2.*lambd...

6 years ago | 0

| accepted

Answered
Is it possible to apply a single function to all images of an imageset?
z = imageset(uigetdir(*)) uC = *.Count bw = cell(Uc,1) ; for i = 1:uC pic = read(z,i); bw{i} = im2bw(pic); end YOu can a...

6 years ago | 0

Answered
texture map an image on triangular mesh
Read about triplot, trimesh, trisurf and patch.

6 years ago | 0

Answered
Small amount of value change in a floating value assignment
Floating point numbers are represented in computer in a binary base i.e. in base 2. Most of the times the floating point numbers...

6 years ago | 0

| accepted

Answered
I have data as a 2D array how can I get the best equation fitting the array data
Read about polyfit, cftool.

6 years ago | 1

Answered
Need help coding assignment
I can draw square using four points. I am drawing a suqare at one point as origin and a side 1 as below. L = 1 ; % length of...

6 years ago | 0

Answered
How to count the total interruption?
There are no NaN's in the data. To get the breaks/ interruption you can get the successuve distances and find the ditances which...

6 years ago | 0

Answered
finding nth value of formula with conditions
n = 10 ; % size of the array a = zeros(n,1) ; % Initialize the array a(1)=2 ; % value at n = 1 a(2)=3 ; % value ...

6 years ago | 1

Answered
Index in position 1 exceeds array bounds (must not exceed 1)
Your L3 is of size 1*34. YOu used L3(n,1) which tried to access L3(2,1) which is not correct. Either you replace L3(n,1) with L3...

6 years ago | 0

| accepted

Answered
Identifying position in array nearest to a value
You can get the intersection point of the line and curve, you can use this https://in.mathworks.com/matlabcentral/fileexchange...

6 years ago | 0

Answered
How can i extract the coordinates for a specified node for a fem model in matlab?
If you nave node numbers nd in hand and point of coorsinates p, you can get the points you want using: iwant = p(nd,:)

6 years ago | 0

Answered
Error: Not enough arguments.
Dont run the function directly using F5 or the run button. Call them by giving inputs. Like: x = yourvalue ; t = your value ...

6 years ago | 0

Answered
Making Triangle in matlab
m = 100; n = 2*m; I = zeros(m,n) ; for i = 1:m-1 idx = (n/2-i):(n/2+i) ; I(i,idx)= 1 ; end imshow(I)

6 years ago | 0

Answered
Any help in this code?
Load the excel file using xlsread. You can search for a word/ string using strfind. You can compare words/ strings using str...

6 years ago | 0

Answered
with the known values of radius and elevation in vector form. How can i do i a 3d plot with this? thank you
iwant = 3*ones(5) ; iwant(2:4,2:4) = 2 ; iwant(3,3) = 1 ;

6 years ago | 0

Answered
How to extract data through the shapefile from global precipitation data.
Load the global data Load the shape file. Get the (x,y) coordinates of your required region shape file. Use inpolygon to get...

6 years ago | 0

| accepted

Answered
new to matlab question
syms x f(x) = (3*x-2)/(2*x+1) ; limit(f(x),x,inf)

6 years ago | 0

Answered
How can I calculate the difference between two matrix with different size?
Do inteprolation using interp2, get them to same size and get the difference. Also have a look on imresize.

6 years ago | 0

Answered
How to represent a Matrix in a figure
A = [1 2 3 ; 4 5 6 ;7 8 9] ; [m,n] = size(A); [X,Y] = meshgrid(1:n,1:m) ; plot(X,Y,'k') ; hold on plot(X',Y','k') ; ...

6 years ago | 1

Load more