답변 있음
Multiplication between elements of two different cells
"first 36 row of F will be multiplied by the first row of T and next 36 row of F will be multiplied by second row of T and conti...

4년 초과 전 | 0

| 수락됨

답변 있음
How to solve error "merge_sort: failed to get memory buffer"
This sounds like your memory is exhausted. Are you running out of RAM?

4년 초과 전 | 0

| 수락됨

답변 있음
Dynamically change .txt file name in MATLAB, COMSOL simulation
fname = sprintf('Results_E_Field_Iter%d.csv', iter); file = fullfile('/Users/marissawhitby/Desktop/C:\Users\jmw\Desktop\Output...

4년 초과 전 | 1

| 수락됨

답변 있음
repeat vector elements and operate on them
Start with a simple loop: A = [12; 10; 5]; B = [4; 3; 2]; RepSum(A, B) function C = RepSum(A, B) len = sum(B); C = zer...

4년 초과 전 | 2

답변 있음
Will this computer run Matlab?
Yes, of course. This is a powerful computer. It depends, on what you want to compute. If a model does not match into the RAM, m...

4년 초과 전 | 0

| 수락됨

답변 있음
Publishing an mfile including the calls to other m files.
Does this help: https://www.mathworks.com/matlabcentral/fileexchange/33476-publish-dependent-and-called-functions ?

4년 초과 전 | 0

답변 있음
I can`t solwe gauss elimination method
I've simplified the code and converted it from Octave to Matlab: A = [ -3 6 -1 -2; -3 3 -3 1; -1.5 4.5 -2.5 -0.5; 0 1.5 -0.5 -3...

4년 초과 전 | 0

| 수락됨

답변 있음
Arrays have incompatible sizes for this operation.
Use the debugger to identify the problem. Type this in the command window: dbstop if error and run the code again. When Matlab...

4년 초과 전 | 0

| 수락됨

답변 있음
How its possible do define this function in Matlab?
Your funcion is almost correct. Just change && to & and consider the logical index time in the output. The problem in your case...

4년 초과 전 | 1

| 수락됨

답변 있음
Automatically Run Script at End of Toolbox Installation
I include a function, which runs once the first time the toolbox is called instead. This is "after the installation", but not di...

4년 초과 전 | 1

| 수락됨

답변 있음
when i was plotting i reveived this error, please help me out....
For me it works: fun = @(x) exp(-x) - 3.*x.^2 + 26 fplot(fun,[0 5]) grid on So if this fails for you, you are running anothe...

4년 초과 전 | 1

답변 있음
How can I vectorize the nested loops in my code to improve performance?
The editor shows you 12 valuable hints already: Letting an array grow iteratively is very expensive. See this example: x = []; ...

4년 초과 전 | 2

| 수락됨

답변 있음
how to solve this MATLAB solve error?
This looks suspicious: "datatype = integer[1]" ?! Maybe there is some preceeding code, which causes problems? At least the show...

4년 초과 전 | 0

| 수락됨

답변 있음
How to get an array of all field elements of a 1xN structure with many fields
Fields = fieldnames(S); for ii= 1:numel(Fields); field = Fields{ii}; [S(:).(field)] end [...] is the horizontal con...

4년 초과 전 | 1

답변 있음
Time-varying coefficient in ODE.
Which ODE solver do you use? Remember that Matlab's builtin ODE solvers like ODE45 ar designed for smooth functions only. A para...

4년 초과 전 | 0

| 수락됨

답변 있음
Extracting data from a figure
The error message looks like you are opening a .fig file but you do not have the required SizeChangeFcn. Then you can redefine t...

4년 초과 전 | 0

답변 있음
Error using fzero (line 184) FUN must be a function, a valid character vector expression, or an inline function object. What is the issue here?
v is the variable of the function. You do not have to deine it as a vector. fzero expects a function handle, but f(vi) is a num...

4년 초과 전 | 0

답변 있음
A Matlab Code is "Attempt to execute SCRIPT ballTrajectoryFun as a function:"
The file ballTrajectoryFun.m is a script, not a function. Functions start with the keyword "function". If they are called from O...

4년 초과 전 | 1

답변 있음
How do i add a for loop if command to a pre existing table
shop1 = [4,5,3,6,0,5,5,6,4,5]; shop2 = [5,3,1,1,3,5,3,6,3,3]; profit1 = 3 * shop1; profit2 = 4 * shop2; pool = {'Sh...

4년 초과 전 | 0

| 수락됨

답변 있음
divide a vector into two vectors of unequal length
A = [1 2 3 4 5 6]; idx = ceil(numel(A) * 2 / 3); B = A(1:idx) C = A(idx + 1:end)

4년 초과 전 | 2

| 수락됨

답변 있음
Error: array indices must be positive integers
You can use the debugger to find the cause of the problem. Let Matlab stop when the error occurs: dbstop if error Type this in...

4년 초과 전 | 0

| 수락됨

답변 있음
I need to make a function that solves the first derivative of a function using forward finite difference. I've tried creating the function but I encountered an error.
You provide the CHAR vector 'q3func' as input, but you want a handle to the function instead: fd = forwarddiff(@q3func, -2:2, 0...

4년 초과 전 | 0

| 수락됨

답변 있음
How to increase the performance of a cycle for in its use in large matrices?
Why do you calculate the mean of the complete BMEDIA matrix, if you use the output for the element (i,j) only? A = zeros(size(d...

4년 초과 전 | 1

| 수락됨

답변 있음
Help with Matlab function
This homework question contains useful instructions already: "Compute n+1 equidistant points xk , k=0,...,n, between a and b" ...

4년 초과 전 | 0

| 수락됨

답변 있음
Facing problems while compiling several large Mex files
The problem is not the compiler, but hidden in the function mex_compiling in the line 9. It looks like tis function expects the ...

4년 초과 전 | 0

답변 있음
how to store a double loop result into a matrix column by column?
You are using one counter k for the up and the down lists. cycle1 = [butterworth_filter1,butterworth_filter2]; [m, n] = size(c...

4년 초과 전 | 0

답변 있음
How to name Array with each of my Arrays in a bulk folder?
Do not hide an index in the name of variables. Although it is piossible to do this using the eval command, it increases the comp...

4년 초과 전 | 1

답변 있음
Is there a way to retrieve MATLAB busy status from a C# application
The direct solution is to let the Matlab script trigger this: function SetBusyFlag(ScriptName) FlagFile = fullfile(tempdir, 'M...

4년 초과 전 | 0

답변 있음
Runge-Kutta 4th Order
Start with Matlab's onramp: https://www.mathworks.com/learn/tutorials/matlab-onramp.html This is not a tutorial for an RK4 sol...

4년 초과 전 | 0

답변 있음
Trying to pass a variable name for a file in a for loop to xlsread
pathname = 'C:\Documents\MATLAB\FileName.xlsx'; This is a fixed CHAR vector and does not consider the variable FileName. Steph...

4년 초과 전 | 0

| 수락됨

더 보기