Answered
how to draw a regular polygon with polarplot command?
Convert polar coordinates to cartesian and then plot. prompt_n=('Input n what you want(n>=3): '); prompt_R=('Input R what you...

3 years ago | 0

| accepted

Answered
For loop based on files names and locations
% get the folder contents d = dir() ; % remove all files (isdir property is 0) dfolders = d([d(:).isdir]) ; % remove '.' and...

3 years ago | 0

Answered
can you help me to fix this error in code?
Replace errors= errors + sum(s1 = s_hat(1,1)) + sum(s2 =s h ​ at(1,1))+sum(s2 = s_hat(1,2)); with errors= errors + ...

3 years ago | 0

Answered
Neural Network Error for Number of inputs does not match the net number of inputs
This line: op = trained_net(DataE20); should be: op = trained_net(inputs');

3 years ago | 1

| accepted

Answered
2D Surface Random Number Plot
% Make grid x = linspace(0,1,11) ; y = linspace(0,1,11) ; [X,Y] = meshgrid(x,y) ; % Get mid points of each element mx =...

3 years ago | 1

| accepted

Answered
How do I plot a 3D surface plot from two for loops
clear all close all clc %I-U curve T = 80; r1 = 4.45153e-5; r2 = 6.88874e-9; r = r1 + (r2*T); s = 0.33824; d1 = -3.12...

3 years ago | 0

| accepted

Answered
Simplify matrix using symbolic matrix
syms X O A = [X O O ; O 2*X O ; O O X]

3 years ago | 0

Answered
Finding rows of minimum valueS by group
Let date2 and TimeToMaturity be your two column arrays. [c,ia,ib] = unique(date2) ; N = length(c) ; iwant = zeros(N,1) ; fo...

3 years ago | 0

Answered
How can I show the error message when the input data get wrong?
prompt = {'Start Year:','End Year:'}; dlgtitle = 'Year Range (Between 2000 and 2019)'; dims = [1 50]; answer = inputdlg(promp...

3 years ago | 0

Answered
How to interpolate the data inside the polygon?
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1222307/Book2.xlsx') ; x = T.X ; y = T.Y ; z = T...

3 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
Check the result or size of: (kads_A*(K_bedA^n) - w_bedA_const*w_bedA/wm)*wm It seems, the above is not a scalar or a single n...

3 years ago | 1

Answered
need help creating a loop URGENT
for x = 0:0.1:5 if x>=3.3 disp('signal recevied soil is dry time to water') writeDigitalPin(a,'D2',1);pause(0.2);writeDig...

3 years ago | 0

Answered
Error in using reshape
The error is simple....you are trying to reshape more number of elements than present in the matrix. EXample: A = rand(9,1) ;...

3 years ago | 0

Answered
divide row and plot it
data=[1 2 3 1 2 3; 7 8 9 10 11 12] ; data = reshape(data,2,3,[]) ; figure hold on for i = 1:2 plot(data(1,:,i),data(2,:...

3 years ago | 0

| accepted

Answered
smooth contour lines in a slice
REad about interp2, imresize

3 years ago | 0

Answered
how to count the number of scatter points in a each sector region of the 6 concentric circles ?
Let (x,y) be your scattered points. C = [mean(x) mean(y)] ; % center of circle. This would be (0,0) R = 200 ; % RAdius of ...

3 years ago | 1

Answered
Show only two y values in a plot
tol = 10^-3 ; % fix your tolerance idx = abs(wavelength-0.02)<=tol | abs(wavelength-0.04)<=tol ; plot(time(idx),wavelength(...

3 years ago | 0

Answered
How to identify negative slope from plot data?
t = linspace(0,2*pi) ; y = sin(t) ; m = [0 diff(y)./diff(t)] ; plot(t,y) ; hold on plot(t(m<0),y(m<0),'+r') plot(t(m...

3 years ago | 0

Answered
How to replace 0 value with 3 in Matlab
c5 = Dataset(:,5) ; % Find the number of 0, 1, 2 idx = c5 == 0 | c5 == 1 | c5 == 2 ; % gives logical indices nnz(idx) ...

3 years ago | 0

Answered
How to multiply each term in a n*n matrix with elements in a column matrix
A=[ 0.34005, 1.15985, -1.42862; 0.45204, -0.12963, -0.07851; 0.18586, -0.49792, 0.56187; 0.20188, 0.19786, -0.54699] ; B=[0; 0;...

3 years ago | 0

Answered
I want help solving differential equations
syms x y(x); eqn = diff(y,x)==exp(x)/(2*y) sol = dsolve(eqn)

3 years ago | 0

| accepted

Answered
Which approach is useful here to get a plot?
Check and then use. I have quickly typed it without much thought. n1 = linspace(0,1) ; n2 = linspace(0,1) ; n = cat(3,n1,n2...

3 years ago | 0

| accepted

Answered
image storage with index type 0000
for i = 1:10 name = ['ortophoto_',sprintf('%.4d',i),'.bmp'] end

3 years ago | 0

Answered
How do I make my circle display in pink and background in white color?
[m,n] = deal(500) ; % side of image I = ones(m,n,3) ; % initialize image with white background % GEt cirlce on the image...

3 years ago | 0

| accepted

Answered
Can anyone explain this step:? Contour function
[X,Y,Z] = peaks(50) ; c = contour(X,Y,Z) ; hold on plot(c(1,:),c(2,:),'*r') axis([-3 3 -3 3]) It gives you the (x,y) coord...

3 years ago | 0

Answered
How to extract multiple location data from a netCDF file
To know the variables in ncfile use ncdisp, ncinfo. To load variables from nc to matlab use ncread. To load data from excel ...

3 years ago | 0

Answered
how to solve error using horzcat dimensions of array being concatenated are not consistent
% running function_simulasi clear clc x0 = 0.02; %g/L tspan = (0:2:80); [t, x]=ode23('function_simulasi',tspan,x0); plot(t...

3 years ago | 0

Answered
Generate inner values of y for each x based on n
clc; clear all ; clear all clc n = 4; % number of divisions on the boundary x1 = linspace(0,2,n); y1_x1 = sqrt(1-( (x1.^2)/...

3 years ago | 0

| accepted

Answered
Help for engineering equations
The logic sounds simple. LHS (theta) can be any physical property like critical temperature, critical pressure, boiling point te...

3 years ago | 1

| accepted

Load more