Answered

how to create a fan shape/ arc inside an image?

May be something like this: [I,map] = imread('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1152743/rect.png') ...

how to create a fan shape/ arc inside an image?

May be something like this: [I,map] = imread('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1152743/rect.png') ...

2 months ago | 0

Answered

Stress strain with respect to time

t = linspace(0,0.25) ; y = sin(pi/2+25*pi*t) ; plot(t,y)

Stress strain with respect to time

t = linspace(0,0.25) ; y = sin(pi/2+25*pi*t) ; plot(t,y)

2 months ago | 0

| accepted

Answered

Extract coordinates from a geopolyshape

The present version is much easier. Note that the class of us_states is a table. You can extract the column using: us_states =...

Extract coordinates from a geopolyshape

The present version is much easier. Note that the class of us_states is a table. You can extract the column using: us_states =...

2 months ago | 0

Answered

How to check decimals of a number in MATLAB?

x = 5.5 integ = fix(x) frac = mod(abs(x),1)

How to check decimals of a number in MATLAB?

x = 5.5 integ = fix(x) frac = mod(abs(x),1)

2 months ago | 1

| accepted

Answered

How to Perform Multivariate Regression with Two Independent Variables on a Surface

REad about fit https://in.mathworks.com/help/curvefit/evaluate-a-surface-fit.html

How to Perform Multivariate Regression with Two Independent Variables on a Surface

REad about fit https://in.mathworks.com/help/curvefit/evaluate-a-surface-fit.html

2 months ago | 0

Answered

can i access field by using values in structure?

S = struct ; S.name = {'Tom' 'Dick' 'Harry'} ; S.sex = {'M' 'M' 'F'} ; S.Age = [16 17 18] ; val = 'F' ; fields = fieldna...

can i access field by using values in structure?

S = struct ; S.name = {'Tom' 'Dick' 'Harry'} ; S.sex = {'M' 'M' 'F'} ; S.Age = [16 17 18] ; val = 'F' ; fields = fieldna...

2 months ago | 0

| accepted

Answered

How do I obtain a scatter plot of the vegetation optical depth (VOD) data in MATLAB?

Let X,Y be our lon and lat data; Z be your VOD data matrix. pcolor(X,Y,Z) colormap(jet) shading interp colorbar

How do I obtain a scatter plot of the vegetation optical depth (VOD) data in MATLAB?

Let X,Y be our lon and lat data; Z be your VOD data matrix. pcolor(X,Y,Z) colormap(jet) shading interp colorbar

2 months ago | 0

| accepted

Answered

Represent a vector as ± form

v1 = [86 90 87 89 88]; iwant = [v1-2;v1+2] % first row is v1+2 and second row is v1-2

Represent a vector as ± form

v1 = [86 90 87 89 88]; iwant = [v1-2;v1+2] % first row is v1+2 and second row is v1-2

2 months ago | 0

Answered

Unrecognized function or variable 'gammatonegram'. Any reason why this is happening?

It is not a inbuil function. You need to provide the function. A quick google lead me to this link: https://github.com/MuSAELa...

Unrecognized function or variable 'gammatonegram'. Any reason why this is happening?

It is not a inbuil function. You need to provide the function. A quick google lead me to this link: https://github.com/MuSAELa...

2 months ago | 1

| accepted

Answered

HOW TO CONVERT FORTRAN CODE TO MATLAB?

The code says it LU decomposition. SEarch in google and file exchange you will get many codesw riteen and submitted. https://i...

HOW TO CONVERT FORTRAN CODE TO MATLAB?

The code says it LU decomposition. SEarch in google and file exchange you will get many codesw riteen and submitted. https://i...

2 months ago | 0

| accepted

Answered

I do not understand why this script {8/2<5*3+1>9} with logical operators gives NO (0)?

8/2<(5*3+1) & (5*3+1)>9

I do not understand why this script {8/2<5*3+1>9} with logical operators gives NO (0)?

8/2<(5*3+1) & (5*3+1)>9

2 months ago | 0

Answered

How to write data to text file with the same space before and after values?

You need to proceed like shown below. A = rand(4) ;% Demo matrix [mrows, ncols] = size(A) ; fmt = [repmat('%f ', 1, ncols) '...

How to write data to text file with the same space before and after values?

You need to proceed like shown below. A = rand(4) ;% Demo matrix [mrows, ncols] = size(A) ; fmt = [repmat('%f ', 1, ncols) '...

2 months ago | 1

| accepted

Answered

Dividing a big matrix into small matrices(or Multiply a portion of a matrix to another) to multiply it with a small matrix and after that re add them into the same position.

A = [1 2 3 4 5 6 ; 6 5 4 3 2 1 ; ...

Dividing a big matrix into small matrices(or Multiply a portion of a matrix to another) to multiply it with a small matrix and after that re add them into the same position.

A = [1 2 3 4 5 6 ; 6 5 4 3 2 1 ; ...

2 months ago | 0

| accepted

Answered

how i can plot orbit of vibration of a rotating shaft with its center

x1=BD(1:10000,1 ) % the vibration vector readings in x direction y1=BD(10001:20000,2) % the vibration vector reading...

how i can plot orbit of vibration of a rotating shaft with its center

x1=BD(1:10000,1 ) % the vibration vector readings in x direction y1=BD(10001:20000,2) % the vibration vector reading...

2 months ago | 0

Answered

How to use quiver correctly?

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1147075/quiver_input.csv') ; WDate = datenum(T.(1)...

How to use quiver correctly?

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1147075/quiver_input.csv') ; WDate = datenum(T.(1)...

2 months ago | 1

Answered

time series comparison and grouping similarly behaving time series

REad about plotregression

time series comparison and grouping similarly behaving time series

REad about plotregression

2 months ago | 1

Answered

Plotting a bird using mathematical equation issue.

You need to modify the radius Rk so that, it gives the look. clear; close all; clc; A =@(k) sin((pi*k)./20000); B =@(k) cos((...

Plotting a bird using mathematical equation issue.

You need to modify the radius Rk so that, it gives the look. clear; close all; clc; A =@(k) sin((pi*k)./20000); B =@(k) cos((...

2 months ago | 0

| accepted

Answered

Graph not showing plots

If you want to use loop, you need to use a marker to show up the plot. clear; hold on grid on g=9.8; for m=60:70 y=(14*...

Graph not showing plots

If you want to use loop, you need to use a marker to show up the plot. clear; hold on grid on g=9.8; for m=60:70 y=(14*...

2 months ago | 0

Answered

Graph not showing plots

clear; g=9.8; m=60:70 y=(14*35)./(m.*g); plot(m,y) grid on

Graph not showing plots

clear; g=9.8; m=60:70 y=(14*35)./(m.*g); plot(m,y) grid on

2 months ago | 0

Answered

How do i determine the highest values of my for loop?

x = 3:0.2:9 ; y=(cos(x+1)./(pi*x-1)); [val,idx] = max(y) ; [x(idx) y(idx)]

How do i determine the highest values of my for loop?

x = 3:0.2:9 ; y=(cos(x+1)./(pi*x-1)); [val,idx] = max(y) ; [x(idx) y(idx)]

2 months ago | 0

| accepted

Answered

Trying to find the value of z for any value of k

Read about subs. Using this, you can substitute the required value of k. You need to convert the result/ syms call into a number...

Trying to find the value of z for any value of k

Read about subs. Using this, you can substitute the required value of k. You need to convert the result/ syms call into a number...

2 months ago | 0

| accepted

Answered

I want to use between two values while plotting

a=linspace(0,1,50) ; x=linspace(0,1,50) ; [X,Y] = meshgrid(a,x) ; Z=X.^Y; surf(X,Y,Z)

I want to use between two values while plotting

a=linspace(0,1,50) ; x=linspace(0,1,50) ; [X,Y] = meshgrid(a,x) ; Z=X.^Y; surf(X,Y,Z)

2 months ago | 0

| accepted

Answered

I want to only run my loop till 22 but it shoud take odd numbers for x_random and even for y_random

for i=1:22 if mod(i,2)==0 P(2,i) = y_random(i); %y coordinate else P(1,i) = x_random(i); %x coordi...

I want to only run my loop till 22 but it shoud take odd numbers for x_random and even for y_random

for i=1:22 if mod(i,2)==0 P(2,i) = y_random(i); %y coordinate else P(1,i) = x_random(i); %x coordi...

2 months ago | 1

| accepted

Answered

How to replace matrix elements by using statements?

It is very simple and straight forward. Consider this example. A = rand(3) ; A(A<0.3) = 0 ; A(A>0.8) = 1 ;

How to replace matrix elements by using statements?

It is very simple and straight forward. Consider this example. A = rand(3) ; A(A<0.3) = 0 ; A(A>0.8) = 1 ;

2 months ago | 1

| accepted

Answered

Implementing Euler's method for a 1D system

h=0.1; x=-5:h:5; y=zeros(size(x)); y(1)=0; for n=1:length(x)-1 dydx=3*x(n).^2+2*x(n)-12; y(n+1)=y(n)+dydx*h; end ...

Implementing Euler's method for a 1D system

h=0.1; x=-5:h:5; y=zeros(size(x)); y(1)=0; for n=1:length(x)-1 dydx=3*x(n).^2+2*x(n)-12; y(n+1)=y(n)+dydx*h; end ...

2 months ago | 0

| accepted

Answered

Plot of a butterfly using mathematical equations

Don't use loop...instead use scatter. Read about it. clc; clear all ; clear; close all; clc; sin1 =@(k) sin((pi*k)./40000...

Plot of a butterfly using mathematical equations

Don't use loop...instead use scatter. Read about it. clc; clear all ; clear; close all; clc; sin1 =@(k) sin((pi*k)./40000...

2 months ago | 1

| accepted

Answered

Scatter points with a colormap based on distances

You can use scatter3. x = rand(10,1) ; y = rand(10,1) ; z = rand(10,1) ; d = rand(10,1) ; scatter3(x,y,z,[],d,'filled') ...

Scatter points with a colormap based on distances

You can use scatter3. x = rand(10,1) ; y = rand(10,1) ; z = rand(10,1) ; d = rand(10,1) ; scatter3(x,y,z,[],d,'filled') ...

2 months ago | 1

| accepted