已回答
I want to do a 1D integral of some 2D data
trapz function has been wrongly used, trapz(x_array, F(x,y)) is with . So you should do following x=linspace(-3,3,200); y=lins...

3 years 前 | 1

| 已接受

已回答
Incorporating guess count into a loop
(1) guess higher and guess lower were in the wrong position; (2) the count guessTimes should be initialized outside of the loop...

3 years 前 | 0

已回答
How to put "."after variables in a function for mesh command
Those with matrix times matrix or nth power of a matrix should be used with '.' nc=10; [D,delta_z] = meshgrid(((-1:1/nc:1)*2.5...

3 years 前 | 0

| 已接受

已回答
How can i match value in file and write the match corresponding row in new file
If, for example, your data can be read by readtable function. File name is 'Data.txt', File format is as following: Col1 ...

3 years 前 | 1

| 已接受

已回答
how to solve the one dimension Schrodinger equation?
Search the File Exchange for schrodinger equation,examples are too many

3 years 前 | 0

已回答
Reading .txt with multiple delimiters
If each line in the file is of the same format, I recommend the following formatSpec formatSpec = 'Sensor %d| %d| %f mS...

3 years 前 | 0

已回答
How to plot using a loop on the same axis
Is the time array t the same size as position1,speed1 for each loop with different customers? If so, then following loop will h...

3 years 前 | 0

| 已接受

已回答
Please Solve error occurring while solving differential equation with ode15s
Just rewrite dxdt = A_cap*[x(1);x(2);x(3);x(4);x(5);x(6)] + R*F; N*[x(7);x(8);x(9);x(10);x(11);x(12)]+L*y + R*F_cap t...

3 years 前 | 0

| 已接受

已回答
use string as x and y for a plot
Just use str2double function! NOMAX410LCR_Cp = str2double(NOMAX410LCR_Cp); NOMAX410LCR_Frequenz = str2double(NOMAX410LCR_Frequ...

3 years 前 | 0

已回答
Answer this Newtons Method problem
why not use fsolve or fzero? The following is newton's method function main f = @(x) [ sin(x(1)*x(2)) + x(1) - x(2); ...

3 years 前 | 0

已回答
Preallocating str for speed
According to @dpb's answer, here I provide a more general answer! T='956754674275'; encode = 'ABCDEFGHIJ'; str = encode(doubl...

3 years 前 | 0

已回答
How to find unknown constants from exponential equation
Your code is ok, but the nonlinear model function may not so well selected! clear v = xlsread('Book1.xlsx'); x=v(:,2); t=v(:...

3 years 前 | 0

已回答
Draw circle and ellipse in matrix
in line 3, do not use domain=ones(nx,ny); but use domain=ones(ny,nx);

3 years 前 | 0

提问


How can I timely recieve the simulation results via email
I use matlab to simulate something interesting, e.g., finite element analysis, but it takes long time to finish. Each time step ...

3 years 前 | 1 个回答 | 0

1

个回答

已回答
How to remove all the rows containing a substring from a table?
Assume the table is named 'myTable'. Then p = arrayfun(@(i)strncmpi(myTable.beregnings{i}(end:-1:1),'maertsnwod',10),(1:1:siz...

3 years 前 | 0

| 已接受

已回答
Replace NaN with median per column
It is convenient to use fillmissing function to get what you want matOut = fillmissing(matrixIn, 'linear', 'EndValues','nearest...

3 years 前 | 1

已回答
How can I extract quickly the numbers separated my commas and parenthesis from a txt file?
It is quite easy to do so. fid = fopen('a.txt','rt'); % a.txt is your file name a = textscan(fid,'(%f, %f) %f'); a = cell2mat...

3 years 前 | 0

已回答
RK 6 method giving large errors
Did you compare it with solution from ode45 or ode23s in the matlab?

3 years 前 | 0

已回答
I want my graph to be continuous
It may work if you do by following Scott MacKenzie's advice or maybe you can do like this t = [0:1:6, 6.01:0.01:6.99, 7:1:30]; ...

3 years 前 | 0