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

ongeveer een maand ago | 1

| accepted

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(...

ongeveer een maand ago | 1

| accepted

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...

ongeveer een maand ago | 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 ...

ongeveer een maand ago | 1

| accepted

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...

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

| accepted

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-...

ongeveer een maand ago | 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...

ongeveer een maand ago | 1

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 1

| accepted

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 ...

ongeveer een maand ago | 0

How do I compute volume of a set 3-D point?

ongeveer een maand ago | 0

| accepted

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 =...

ongeveer een maand ago | 0

| accepted

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...

ongeveer een maand ago | 0

| accepted

How about this approach? load('p0_t.mat') ; x = t ; y0 = min(p0(:)) ; y1 = max(p0(:)) ; y = linspace(y0,y1,300) ; [X,Y...

ongeveer een maand ago | 0

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

ongeveer een maand ago | 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...

ongeveer een maand ago | 0

How to select the frame at the mouse click from a video?

ongeveer een maand ago | 1

| accepted

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 ...

ongeveer een maand ago | 0

| accepted

Average a section of a column in a table base don 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

ongeveer een maand ago | 0

| accepted

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...

ongeveer een maand ago | 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) ; ...

ongeveer een maand ago | 0

| accepted

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...

ongeveer een maand ago | 0

| accepted

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...

ongeveer een maand ago | 0

| accepted

Drawing a circle with known radius
th = linspace(0,2*pi)' ; R = 1; x = R*cos(th) ; y = R*sin(th) ; % make groups G = zeros(size(th)) ; G(th >= 0 & th < ...

ongeveer een maand ago | 1

| accepted

How to merge two matrix?
a=[6 6 5 6 5 6 6] ; b = [0.74 0.66 0.58 0.47 0.62 0.75 0.76] ; [c,ia,ib] = unique(a) ; N = length(c) ; G = cell(N,1)...

ongeveer een maand ago | 0

| accepted

How to create a cell array by repeating a row vector
A = 1:10 ; B = reshape(repelem(A,4,1),2,2,10) ; C = num2cell(B,[1 2]) ; celldisp(C)

ongeveer een maand ago | 0

Graph plotting of f(x,y)=e^x+e^y using ezsurf
clear clc syms x y f=(exp(x)+exp(y)) ezsurf(f) colormap cool

ongeveer een maand ago | 0

| accepted