답변 있음
command or how to obtain best real root of a polynomial with given unknown coefficient.
syms x a b c d e p = a*x^4+b*x^3+c*x^2+d*x+e==0 s = solve(p,x)

대략 4년 전 | 0

답변 있음
Updating variable after each loop iteration
generated_word='matlabcommunity' ; newChr=[]; promt = cell(length(generated_word),1) ; for i=1:length(generated_word) ...

대략 4년 전 | 0

답변 있음
Given a matrix, how can I slice a matrix given the input parameters are the number of rows and number of columns? See example.
Read about mat2cell. origImgMatrix = [2 4 6 8 9 2 3 4 1 4 9 8 3 9 1 4 ];...

대략 4년 전 | 0

답변 있음
Best fitting curve for variable data
% data x = [1.0779 1.2727 1.4700 1.5766 1.6471 1.7396 1.7828 1.8208 1.8370]' ; y = [7.9511 9.8400 ...

대략 4년 전 | 1

답변 있음
Plot only a part of the histogram
Read about xlim. xlim([-0.1 0.1])

대략 4년 전 | 0

| 수락됨

답변 있음
MAKE Vector by loop and if statement
If you want to store the index: y = zeros([],1) ; u=length(Datatest.Timehhmm); count = 0 ; for i=1:u z= Datates...

대략 4년 전 | 0

답변 있음
Error on plotting (Index in position 1 exceeds array bounds. Index must not exceed 51.)
Simply try: surf(T_n)

대략 4년 전 | 1

| 수락됨

답변 있음
Problems with a if statement in a for-loop
id = true(anzahl_runs,1) ; for k=1:anzahl_runs if any (intens_RL(k,:)==1) Ratio(k,1)=SpalteSr87(k,:)/SpalteSr86(...

대략 4년 전 | 2

| 수락됨

답변 있음
Index exceeds the number of array elements. Index must not exceed 1 error
The function dxdtProb20222 needs input as x; x should be an array of size 1x6 or 6x1. It seems in your case x is of not that siz...

대략 4년 전 | 0

답변 있음
Storing values from for-loop into a matrix
In MATLAB array indices should be posititve integers, in the given code, i the loop index is used as index in T, V; i is not an ...

대략 4년 전 | 1

| 수락됨

답변 있음
Fit a least squares ellipse
Replace this line: A=R(1:6); with A=R(1,6); There is a typo error in getting A. A is a vector in your case, you arenot gett...

대략 4년 전 | 0

| 수락됨

답변 있음
Gather specially vector satisfied the condition
np=100; X = zeros(np) ; x = 1.5*randn(np,1); for i = 2:np X(:,i) = 0.5*(X(:,i-1)+randn(np,1)); end

대략 4년 전 | 0

| 수락됨

답변 있음
Calculate and plot the shortest distance (norm) between a point and a line in 3D space
It is an easy task to achieve. You can find the foot of the perpendicular. Refer this: https://www.toppr.com/ask/question/the-...

대략 4년 전 | 0

답변 있음
Separating data into one-second intervals, and finding the maximum data in each interval
As you said data is from 40-80 seconds and each second has 1300 data points, you can pick the first 40*1300 rows and reshape the...

대략 4년 전 | 1

답변 있음
Extract Cell Data Contain With Char
fg = {'07-Apr-2022'; '08-Apr-2022'; '09-Apr-2022'}; datetime(fg)

대략 4년 전 | 0

| 수락됨

답변 있음
why I can't export the training plot
Try: currentfig = findall(groot, 'Tag', 'NNET_CNN_TRAININGPLOT_UIFIGURE'); savefig(currentfig,['Training,','.fig']);

대략 4년 전 | 1

| 수락됨

답변 있음
Lines vanishing on plot when rescaling axes
I don't think they are vanishing...they might be mixing up with the already existing line: Try: plot(xdata, ydata1, 'k') hold ...

대략 4년 전 | 0

답변 있음
How do I compute volume of a set 3-D point?
Read about trapz. Refer: https://in.mathworks.com/matlabcentral/answers/1455449-how-to-calculate-volume-of-surf-plot-3d-plot-e...

대략 4년 전 | 0

| 수락됨

답변 있음
Why I see only the last value of my row vector in the workspace?
You are using the vector as the loop index so obviously you will find only the last value. You can check it your self. for a =...

대략 4년 전 | 0

| 수락됨

답변 있음
How to find the mean of a column in a matrix using for loop?
TempSenVal=[58.3 59.2 60.2 63.0 63.3; 62.5 63.8 64.9 65.2 65.8;... 63.2 64.2 65.3 67.8 67.9; 64.0 65.1 67.8 68.2 69.1; 65.5...

대략 4년 전 | 0

| 수락됨

답변 있음
How to plot a color shade instead of graph curves?
How about this approach? load('p0_t.mat') ; x = t ; y0 = min(p0(:)) ; y1 = max(p0(:)) ; y = linspace(y0,y1,300) ; [X,Y...

대략 4년 전 | 0

답변 있음
How to fit a curve into contour plot?
Get the contour line coordinates using the contour function and use polyfit. Read about polyfit.

대략 4년 전 | 0

답변 있음
How to reshape matrix by column number?
demand = [1 78 0 0 0 0 0 0 0 0 8 45 0 1 79 0 0 0 0 31 8 0 0 0 0 0 1 80 456 0 4 0 39 0 0 0 16 0 0] ; n = size(dema...

대략 4년 전 | 0

답변 있음
How to select the frame at the mouse click from a video?
REad about ginput and getpts.

대략 4년 전 | 1

| 수락됨

답변 있음
How to select points from a input video?
v = VideoReader(myvideo) ; n = 10 ; % say this the frame you want to read frame = read(v,n); imshow(frame) [x,y] = getpts ...

대략 4년 전 | 0

| 수락됨

답변 있음
Average a section of a column in a table based on another column values
[c,ia,ib] = unique(T3.index) ; N = length(c) ; iwant = zeros(N,1) ; for i = 1:N iwant(i) = mean(T3.value(ib==i)) ; end

대략 4년 전 | 0

| 수락됨

답변 있음
Using First Two Columns to Solve for Third
M = [0;30;90;180;200;350] ; e = [0.01;0.01;0.01;0.01;0.01;0.01] ; N = length(M) ; iwant = cell(N,1) ; for i = 1:N iw...

대략 4년 전 | 0

답변 있음
Print value of correlation to a plot displaying two functions
R = corr(y1,y2,'Type','Kendall') ; figure(); hold on; plot(Year,y1); hold on; plot(Year,y1); str = sprintf('%f',R) ; ...

대략 4년 전 | 0

| 수락됨

답변 있음
how can i use a loop to run the specific code
ncFiles = dir('E:\data\2002\*.nc') N = length(ncfiles) ; Q = zeros(N,1) ; for i = 1:N ncFile = fullfile(ncFiles(i).fol...

대략 4년 전 | 0

| 수락됨

답변 있음
plot graph for multiple values for one of the variables on the same axis (and in different colours)
You have to initilaize the variables inside the loop. Read about initliaing an array in aloop. r1=18e-2; % inner radius of s...

대략 4년 전 | 0

| 수락됨

더 보기