답변 있음
Solving transcendental equation numerically
You can check this using the debugger. Type this in the command window: dbstop if error Now run the code again. When Matlab st...

대략 4년 전 | 0

| 수락됨

답변 있음
Profiler: time spend at while END statement
I interprete the displayed "times" as a a general problem of the profiler: Matlab's JIT can reorder commands and find abbreviati...

대략 4년 전 | 1

답변 있음
Screen.mexw64 file missing or inaccessible on my MATLAB path
The message explains: This mex file seems to be missing or inaccessible on your Matlab path or it is dysfunctional: Screen.mexw...

대략 4년 전 | 0

답변 있음
Regarding portability of Matlab going from Windows to Linux
I ran a large program (>300'000 lines of Matlab code) fluently after moving it from Windows to a Linux machine. This requires so...

대략 4년 전 | 0

| 수락됨

답변 있음
the meaning of a sentence in command window
It means, that the optimizer did not found a valid solution. The value of the fitness functions does not vary more than the para...

대략 4년 전 | 0

답변 있음
How to shade area between standard deviations in a plot?
data1 = load('mean.mat'); m = data1.mean; data2 = loadt('std.mat'); s = data2.sd; % Do not use "mean" and "std" as ...

대략 4년 전 | 1

| 수락됨

답변 있음
How to let users enter integer, loop reenter again to them if they enter anything else
ready = false; while ~ready n = input('Enter number of patients : '); if ~isscalar(n) || n < 2 || n > 100 || abs(roun...

대략 4년 전 | 0

답변 있음
How to write data to a binary file at a specific position?
% Some test data storing the rows in different files: nRow = 10; nCol = 1e6; for k = 1:nRow [fid, msg] = fopen(sprintf('...

대략 4년 전 | 1

답변 있음
Read a file with textscan.
The file starts with this line: ###################################################################### This does not match the...

대략 4년 전 | 0

답변 있음
I need to create a for loop that begins at 0.01 and increases by a factor of 1.1 until reaching 24.
"I need to create a for loop" This means for or while. "that begins at 0.01" x = 0.01 "and increases by a factor of 1.1" x ...

대략 4년 전 | 0

답변 있음
Add a number to a region of cells bounded by nonzero numbers in a matrix
A = [0 0 0 0 0 0 0 0 0 0; 0 0 0 0 3 9 2 1 3 0; 0 0 2 4 1 0 0 0 0 0; 0 0 3 3 2 4 9 2 0 0; 0 5 1 3 0 0 4 2 0 ...

대략 4년 전 | 0

| 수락됨

답변 있음
Is this a MATLAB bug? (Logical expression)
(x1 | x2) is TRUE, if at least one of them is not zero. If both are zero, FALSE is replied. In the next step TRUE is converted t...

대략 4년 전 | 2

| 수락됨

답변 있음
How to speed up the code to check if randomly generated number in a certain range is a prime ?
Avoid to call isprime repeatedly. If the numbers are limited, check only once, if they are prime: m = false(1, 48593); m(prime...

대략 4년 전 | 0

답변 있음
problem in showing result
Matlab evaluates an expression from left to right. So there is no difference between 610000 <= x11 <= 33683000 and (610000 <=...

대략 4년 전 | 0

| 수락됨

답변 있음
Run another script via run parameter
The best way is to avoid scripts and to use functions instead. Scripts increase the complexity of the code, because side effects...

대략 4년 전 | 0

답변 있음
Optimization of a matrix variable
By: a = z; % instead of z(N:L) ? This looks trivial, so do I oversee a detail?

대략 4년 전 | 0

| 수락됨

답변 있음
How to reduce the decimal places if I want to save the mat file from the workspace?
There are two options: Use a MAT format with compression: -v7.3 . See: doc save Convert doubles to singles or (U)INT32/16/8 a...

대략 4년 전 | 0

답변 있음
Loop through same procedure for different inputs.
cnt = 15; % centre point (s) fqn = 200; % scale factor (Hz) for t = [5, 10, 20] % time period (s) LBD = fq...

대략 4년 전 | 0

| 수락됨

답변 있음
why will my function not take my array 'slope' as an answer. I am writing code to differentiate an equation by finding the average gradient.
If n==6, you request x(7) in: dx = x(n+1)-x(n); There is no x(7). y(n+1) must fail also. The error message is clear. There ar...

대략 4년 전 | 0

| 수락됨

답변 있음
Convert ASCII file numbers to a date/duration
t = [500.00; 121314.15; 235500.00]; mod([floor(t / 10000), floor(t / 100), t], 100) d = duration(mod([floor(t / 10000), floor(...

대략 4년 전 | 2

답변 있음
ode45,Too many output arguments error
The complete error message is (remember to include it in a question, whenever an error occurs): The Problem occurs here: fun...

대략 4년 전 | 1

| 수락됨

답변 있음
How to shuffle rows in pairs in a 600 x 2 matrix that only contains integers?
A = [10 1; ... 30 2; ... 50 1; ... 70 8; ... 90 3; ... 10 5; ... 40 6; ... 50 2]; s =...

대략 4년 전 | 1

| 수락됨

답변 있음
m file code sometimes loss a "end" and corruput the file on hard disc.
It is extremely unlikely, that the 3 characters "end" vanish inside a text file, while the rest of the computer runs without a c...

대략 4년 전 | 0

| 수락됨

답변 있음
How to check for reversed pairings in columns of a matrix?
A = [1 2 5 6 0 2 3 5 6 7 1 8 0 2; ... % Value appended!!! 2 1 7 6 2 0 2 0 0 1 1 1 1 1; ... 3 5 0 1 5 8 2 0 0 2 3 0...

대략 4년 전 | 0

| 수락됨

답변 있음
is it possible to slow down CPU to an arbitrary pace?
I do not know a tool to reduced the CPU speed freely. Even if there is such a tool, you cannot compare a modern multi-core CPU ...

대략 4년 전 | 0

답변 있음
How to read and store user input as an integer.
Either: num = input(prompt); num = round(num); % to be sure or: txt = input(prompt, 's'); num = sscanf(txt, '%i', 1);

대략 4년 전 | 0

답변 있음
Why do I get "no solution found" in fsolve while there is the actual value for them?
Whith the function ala() you function is not smooth. Then a local search, which considers the derivative of the function, must f...

대략 4년 전 | 0

답변 있음
How can I change my plot size?
You can change the 'Position' property of the axes. If you avoid to set the axes limits to 'square' explicitly, this should work...

대략 4년 전 | 0

답변 있음
Sorting a string by the use of another predetermined string order
The question is strange. Currently the best solution is: A = ["FLOATING.NET.P2" "PDSTL" "POLY1.1" "POLY1.5" "CONT.1" "ANCH.4" ....

대략 4년 전 | 0

| 수락됨

답변 있음
Finding the previous consecutive entries in a matrix column
AS far as I understand the discussion, this solves your needs: B = max(cumsum(A, 1) - 1, 0);

대략 4년 전 | 1

더 보기