답변 있음
what does this error mean and how to fix it the image i imported was rgb and this error popped ,when its gray it works fine
imshow can handle RGB images as [M x N x 3] arrays and gray scale images as [M x N] matrices. The latter can be a logical matrix...

대략 3년 전 | 0

| 수락됨

답변 있음
memoize => Save/Restore Cache
There is no documented way to store the cache. But it is cheap to create a look-up table for your function and store it manually...

대략 3년 전 | 1

| 수락됨

답변 있음
Select only the matrices within the cell
C = {rand(2), [], rand(3), [], [], rand(4)}; newC = C(~cellfun('isempty', C))

대략 3년 전 | 0

답변 있음
how to create a struct that would have number of fields that corresponds to the number of iterations inside a loop and also automatically save this data
Result = struct(); for day = 1:7 % No loop needed: MPE1 = signal(:, :, day) - signal(:, :, day) - kE1 * (signal(:, ...

대략 3년 전 | 0

| 수락됨

답변 있음
How to create all possible matrices of zeros and ones without having more than one '1' in the same column?
n = 3; m = 4; c = n^m; X = cell(1, c); % List of outputs v = n .^ (1-m:0); % Calculate expensive power operation once f...

대략 3년 전 | 0

답변 있음
Error using plot vectors must be the same length
The error message is clear. Use the debugger to examine the reasons: dbstop if error Type this in the command window an run th...

대략 3년 전 | 0

답변 있음
MATLAB and several command prompt commands
Try this under Windows: for i = 0:7 command = sprintf('tftp -i 192.168.178.100 get dmafiles-%d && exit &', i); % ...

대략 3년 전 | 0

답변 있음
complicated vectorization of for loop wich icludes if and referes back to last loop iteration results
Why do you assume, that a vectorization is faster? Neither loops nor IF-conditions are slow in modern Matlab versions. Your cod...

대략 3년 전 | 0

답변 있음
I am facing an error "invalid file identifier" while using fprintf and fopen
Whenever you try to open a file, check the success: [file_1, msg] = fopen(outputFileName, 'w'); assert(file_1 > 0, msg); Now ...

대략 3년 전 | 1

제출됨


FileRename
Fast renaming of files or folders

대략 3년 전 | 다운로드 수: 1 |

5.0 / 5
Thumbnail

답변 있음
how to solv this issue?
Replace y=eval(fx); by y = fx(x) and switch grd case 'on' grid on; case 'off' grid off; end by the easier: gr...

대략 3년 전 | 0

답변 있음
how come with same formula, i get two different results in Matlab
See Torsten's comment for the limited precision, if you use 4 decimal places only. In addition, multiplying with the inverse is...

대략 3년 전 | 0

답변 있음
how to write a code for two input -one output function (f=@(v,r)) using bisection method?
pi = 3.14; % Brrrr G = 6.67e-11; M = 2e30; c = 1e4; rho = 1e-21; n = 2.5; gamma = 1 + 1/n; dotm = pi*G^2*M^2*(rho/c^3) * (2...

대략 3년 전 | 0

답변 있음
I HAVE THE FOLLOWING ERROR: "Error using bvparguments" HELP ME TO FIX IT
The code does not run. linspace(0,infinity,40) - what is "infinity" and of course you cannot divide the interval [0, Infinity] ...

대략 3년 전 | 0

| 수락됨

답변 있음
Can you help solving this differential equation using ode15i, please?
dx_dz = ??? x_p = ??? V = ??? Z = ??? h = ??? tspan = [0, 10]; % ??? x0 = rand(1, 5); % ??? [Z, Y] = ode15s(@(z, x) MS_A...

대략 3년 전 | 0

답변 있음
index exceeds the number of array elements. Index must not exceed 1.
Omit the confusing j = 0; It does not have any effect, because the for j command overwrites the value immediately. If Z and/o...

대략 3년 전 | 1

| 수락됨

답변 있음
How to solve 1.0000 not equal to 1 in MATLAB?
Welcome to the world of numerical maths. Remember, that the summation is numerically instable. Even a reordering of the element...

대략 3년 전 | 1

답변 있음
Returning Multiple Variables from a function to be added to existing variable.
What about: [k_1,K_1,B1,b1,c1]=element_stiffness([2,4,1],Coords, v,E,t,D) k = [k, k_1]; % Or: k = k + k_1; % Or: k = z...

대략 3년 전 | 0

답변 있음
How to find max values in vector for each 10 rows
With the bold guess, that you mean rand(100, 1) instead of rand(1:100): data = rand(100, 1); result = max(reshape(data, 10, ...

대략 3년 전 | 0

| 수락됨

답변 있음
How do you solve for a Double summation with loops
If yvect and zvect are both [1 x 101] vectors, this line must fail: uvect = uvect + coef * (cos(ai * yvect) * cos(aj * zvect));...

대략 3년 전 | 0

답변 있음
Get the "File version" of an exe file
Create a VBS script: ' File: FileProductVer.vbs Set FSO=CreateObject("Scripting.FileSystemObject") If Wscript.Arguments.Count...

대략 3년 전 | 1

| 수락됨

답변 있음
for loops out of bounds
for loop i=0:0.5:pi; This is no valid Matlab syntax. You can run code directly in the forum's interface and you will get an er...

대략 3년 전 | 0

| 수락됨

답변 있음
How to convert Universal time to Local time?
The command tzoffset accepts one input only: [dt,dst] = tzoffset(t) Therefore the additional arguments 'EST','5' are not valid...

대략 3년 전 | 0

| 수락됨

답변 있음
Why do I get this error before executing any code in matlab?
Did you search in the forum before asking? If not: https://www.mathworks.com/matlabcentral/answers/520399-why-do-i-receive-erro...

대략 3년 전 | 0

| 수락됨

답변 있음
how not to delete one figure using clf?
clf clears the contents of the current figure. If you do not want this, remove clf. Maybe all you want is to clear the current...

대략 3년 전 | 0

답변 있음
How to insert a new line before a character in file?
What is the wanted output? A cell string? A string? Another file? % Perhaps: str = fileread('yourFile.txt'); str = '$text-text...

대략 3년 전 | 1

답변 있음
remove brace indexing from 1x1 matrix
The quotes are not part of the contents, but shown in the command window only to show, that this is a CHAR vector. Therefore the...

대략 3년 전 | 1

답변 있음
sprintf loop for writing equations
F{i} = sprintf(formatSpec,Dtau(i),l(i),s,alpha_1(i),alpha_1(i)); %^ ^ Curly braces for a cell string

대략 3년 전 | 0

답변 있음
Fastest selection of a coordinate in 3d array that fulfills a condition?
If the condition is not rare in the array, a gun-shot method can be very fast: T = randi(10, 500,500,200); tic doSearch = tru...

대략 3년 전 | 0

| 수락됨

답변 있음
Undefined function or variable in a POD matlab code
A strange detail: function VelocityDistributionPOD (SnapshotsAddress) SnapshotsAddress = pwd; The folder name provided as inp...

대략 3년 전 | 0

| 수락됨

더 보기