답변 있음
Newton's method - problems in calculating alpha value
In the lines: func = @(x) eps * c_s * x^4 + (alpha_k + 1/(s1/lamda1+s2/lamda2)) * x - ... ((1/(s1/lamda1+s2/lamda2...

4년 초과 전 | 0

| 수락됨

답변 있음
how to declear global "import java.awt.Robot" and "import java.awt.event.*"?
If such a global import is possible, it might destroy Matlab's stability. The imported functions without wildcards have a higher...

4년 초과 전 | 0

답변 있음
Performance of log() is wildly different in two different contexts and machines for same data?
Summary: On the 16 GB M1 MacBook, the lines tic tdg_log = log(tdg); toc displays, that the processing needs 1.5 seconds. U...

4년 초과 전 | 0

답변 있음
Numerical integration of discrete data using higher precision
You explain, that you have discrete data, but the code you show uses a function. If the data are given in double precision, usin...

4년 초과 전 | 0

답변 있음
Passing multiple Arrays to loop a Function and creating a 1 column array
The code contains some strange details: A = ArrayA; (1,000x1) Double Please use the standard notation. I assume this would be ...

4년 초과 전 | 0

답변 있음
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
Let Matlab stop at the error using the debugger: dbstop if error Then run the code again. If it stops, chek the sizes of the u...

4년 초과 전 | 0

답변 있음
how do I put waitbar inside a figure (Matlab 2016a)?
You find a lot of examples in the FileExange. Search there for "porgressbar": https://www.mathworks.com/matlabcentral/fileexcha...

4년 초과 전 | 0

| 수락됨

답변 있음
Calculationg with quternions Matlab function did not work
function p_A = q_transform_coordinate_vector(R_A_B, p_B) % ^^^^^ p_A = q_A_B * q_pu...

4년 초과 전 | 1

| 수락됨

답변 있음
Error using reshape: Size arguments must be real integers. Except all values are positive whole numbers?
Change: raw_data.variable_mat = raw_data.variable_mat(:,1:reshape_val); to raw_data.variable_mat = raw_data.variable_mat(:,1:...

4년 초과 전 | 1

| 수락됨

답변 있음
How to solve this error: =: nonconformant arguments (op1 is 1x1, op2 is 100x1)?
T = linspace(0, 10)'; % Time f = 0.1; % Frequency Am = 10; % Phase F = Am*sin(2*pi*f*T); % Sin wave input Now F is a [100, ...

4년 초과 전 | 0

답변 있음
Can I hit the "OK" button on inputdlg through coding?
See this example for creating your own dialog with a timer: https://www.mathworks.com/matlabcentral/fileexchange/24871-autowarnd...

4년 초과 전 | 0

답변 있음
Interpolation method of IMAGE
x = zeros(640, 480, 3); x(:, 1:2:end, :) = 1; image(x) This looks confusing to me in the online version: Where are the steps ...

4년 초과 전 | 0

답변 있음
MEX-file efficiency with multiple file-pass function calls in .m script
Do you use the terms "function" and "script" correctly? Functions and scripts are stored in .m-files. Functions start with the ...

4년 초과 전 | 0

질문


Submit button not working sometimes
A few weeks ago the Submit button in this forum stopped to work for me in about 50% of the cases. Then I copy my answer or comme...

4년 초과 전 | 답변 수: 2 | 3

2

답변

답변 있음
Linear indexing in 3D matrix
Look into the code of sub2ind. It is easy to create an inline version of what you want: s = [2, 3, 4]; x = reshape(1:prod(s), ...

4년 초과 전 | 0

답변 있음
I am facing problem regarding storage of values for d() using for loop which is of 100x100 size for each iteration of a and k.
You overwrite the data by zeros repeatedly: for t=1:L for v=1:elements for w=1:elements % Here all f...

4년 초과 전 | 0

답변 있음
removing zeros from matrix
x(x==0) = []; % Or: x = x(x~=0); Where do the zeros come from? Instead of removing them it might be easier to avoid to crea...

4년 초과 전 | 0

답변 있음
Trisurf : How to interactively change the plot opacity?
GUIs are not hard to control. function testGUI % Some test data: [x,y] = meshgrid(1:15, 1:15); tri = delaunay(x,y); z = pea...

4년 초과 전 | 0

답변 있음
How to take output from one program as input in the same?
Of course this is possible. A trivial example: function main [a, b] = thePoints; alpha = theAngle(a, b); disp(alpha) end ...

4년 초과 전 | 2

| 수락됨

답변 있음
How to center a cloud of data points (x,y,z) to coordinate origin in 3-D space?
I'm not sure, what "center each marker" means. But I assume you want to subtract the mean value: trajectory = [167.282166 37...

4년 초과 전 | 0

| 수락됨

답변 있음
solve an ode with three methods in the same script
Each function has its own workspace. The results of the called scripts are stored in the workspace of the function mainfunctionm...

4년 초과 전 | 0

답변 있음
If it is possible to display matlab's command window in app designer's text area?
See: FEX: CmdWinTool cmdWinDoc = com.mathworks.mde.cmdwin.CmdWinDocument.getInstance; initial = cmdWinDoc.getLength; % Ru...

4년 초과 전 | 1

답변 있음
Split cell each 13 characters
It would be usful, if you post your input data and the wanted output. Currently I find the information matrix of about 32x1 ea...

4년 초과 전 | 0

답변 있음
Reverse of find groups
Use the 2nd output of findgroups: A = [1,1; 1,2; 2,2; 3,3; 3,4; 1,3; 1,2]; [G, ID1, ID2] = findgroups(A(:, 1), A(:, 2)); AG =...

4년 초과 전 | 0

답변 있음
Discrepancies between single and double precision sum over time
This is the expected behaviour. Remember that the sum is an instable numerical operation. d = zeros(1,1e7); s = zeros(1, 1e7, ...

4년 초과 전 | 0

| 수락됨

답변 있음
not able to solve the integration function
This cannot work: x(j) = linspace(0,0.025,101); On the left is a scalar and on the right a vector with 101 elements. Seeing o...

4년 초과 전 | 0

답변 있음
How to work with Struct With Struct construction
It is not clear, how the inputs data exactly look and what you want as output. Prefer to post some code, which produces both. M...

4년 초과 전 | 1

| 수락됨

답변 있음
Create diagonals along a block matrix
With some bold guessing and knowing, that this might be more confusing than useful: The input A is a cell vector and the wanted...

4년 초과 전 | 0

| 수락됨

답변 있음
Why do I get "Array indices must be positive integers or logical values." Error
global net_stg9; % Previously trained network netw = net_stg9; my_output = netw(my_input); netw seems to be an array, not a t...

4년 초과 전 | 0

| 수락됨

답변 있음
How to plot 50 figures each has 3 curves for loop
You show us the code to create one set of lines. Then simply add this command before plotting: figure() axes('NextPlot', 'add'...

4년 초과 전 | 0

| 수락됨

더 보기