답변 있음
How can I Use writecell with a dynamically changing file save name?
Maybe you mean: writecell(output, [baseFileName, '.csv']); baseFileName.csv would be the field 'csv' of a struct called baseFi...

대략 4년 전 | 0

| 수락됨

답변 있음
Error in code when using the Euler method
Use te debugger to examine the problem: dbstop if error Run the code again until it stops at the failing line. Then check the ...

대략 4년 전 | 0

답변 있음
expression error in Documentation
Yes, this sounds reasonable. Send this information to MathWorks as an enhancement request. You find the "Contact Support" link ...

대략 4년 전 | 0

| 수락됨

답변 있음
How to match to figure in Matlab?
imshow changes the ydir property of the axes. Better add another axes object at the same position as the first one to avoid conf...

대략 4년 전 | 0

답변 있음
Unable to perform assignment because the left and right sides have a different number of elements
Data = nan(1, length(NpingZ)); % Pre-allocate and default value for i=1:length(NpingZ) x = find(Mdata(1:VecA(i), i) < 100,...

대략 4년 전 | 0

| 수락됨

답변 있음
random assignment to 1s in a matrix
I do not understand the question: "I was able to assign 1 to 1 with this code." - what is the purpose of setting a 1 to a 1? "...

대략 4년 전 | 1

| 수락됨

답변 있음
What is the meaning of symbol “.”in this code
While ^ is the power operation, which acts on the complete array, .^ is the elementwise power. For a scalar, this is no differen...

대략 4년 전 | 0

| 수락됨

답변 있음
How to convert a big fortran IV code to matlab ?
I'd never trust an automatic translation. But if you try it, make it as simple as possible: no intermediate conversion to FORTRA...

대략 4년 전 | 2

답변 있음
Not enough input arguments Error in bvpfcn (line 5) dydx = [y(2)*(U*y(2)+K*y(1))/D];
r = bvp4c(ode,bc,solinit); % ^^^ This is a call of the function ode() without input arguments. You want to provide a f...

대략 4년 전 | 0

답변 있음
i want to replace 2 pixels in the matrix by using this function between two pixels throw me this error
Use the debugger to examine the problem: dbstop if error Then run the code again. When Matlab stops in the failing line, check...

대략 4년 전 | 0

답변 있음
Help needed for the below logic
Why do you want to avoid a loop? If it is running, everything is fine. The calculation of the parameters v, k, h1, ... could be...

대략 4년 전 | 0

답변 있음
Putting points into groups of three to find their centers
Guessing, that the "points" are [1x2] vectors: A = [1, 12]; B = [2, 10]; C = [3, 17]; D = [4, 9]; P = cat(1, A, B, C, D);...

대략 4년 전 | 0

| 수락됨

답변 있음
How do you remove multiples of certain numbers from a row vector?
You do not need a loop. n = 100; x = false(1, n); x(3:3:n) = true; x(5:5:n) = true; x(15:15:n) = false; Result = f...

대략 4년 전 | 1

답변 있음
Unable to find symbolic solution warning
Just a hint: syms x(t) y(t) z(t) w(t) L = 18e-3; % This is an expensive power operation: 18*10^(-3)! C2 = 68e-9; % This ...

대략 4년 전 | 1

| 수락됨

답변 있음
Problem to load tiff files using for loop
load() works with MAT files and some text formats only. If you want to load an image file, use imread(). Using CD to change th...

대략 4년 전 | 0

| 수락됨

답변 있음
Separating an array based on row data?
Data = randi([0,3], 4, 3) % Some Test data good = all(Data, 2); % No zeros in a row goodData = Data(good, :) badDa...

대략 4년 전 | 0

답변 있음
How to change the size and position of subplots after defining axis handles
[Copied from the comments] subplot is a wrapper for an axes command defining a specific position. If you change the position la...

대략 4년 전 | 1

| 수락됨

답변 있음
Generating bit stream with N samples per bit
I'm not sure, what you are asking for. Maybe you mean: x = randi([0,1], 1, 5) n = 3; % Easier to read here. Use 10 in your ca...

대략 4년 전 | 0

답변 있음
how do I extend my function on the time axis by the function value of 0 ?
I'm not sure, what the purpose of the loop is, but this is not a loop at all: for i = 1:length(t_Final) If t_Final is 10, ...

대략 4년 전 | 1

답변 있음
Count number of digits after decimal point?
If your input is '0.2500', it is not a number, but a char vector. Then considering the trailing zeros is possible. But if you ar...

대략 4년 전 | 0

답변 있음
Will the Apple M1 Ultra provide a performance improvement (simulation time) over currently available processors?
It is (or would be) a huge improvement, if Matlab runs natively on the M1. You can spend a lot of money to buy some hardware, w...

대략 4년 전 | 0

답변 있음
If I reset my laptop, do I have to re-purchase Matlab?
Yes, this is working. If the activation is lost, you can deactivate the old computer and reactivate it on the new one - even if ...

대략 4년 전 | 0

답변 있음
Rename files: keep only first 5 characters
Folder = 'C:\Your\Folder'; List = dir(fullfile(Folder, '*.*')); List([List.isdir]) = []; % [EDITED] remove folders for k ...

대략 4년 전 | 1

답변 있음
Can't uninstall Matlab2016b
I had a crash during an installation and could not uninstall Matlab afterwards. Then installing it again repaired the files and ...

대략 4년 전 | 0

답변 있음
ismembertol: What am I doing wrong?
find() replies the indices of the non-zero elements. Indices are positive integers >= 1. ismembertol(x, Transparency, 1e-16) s...

대략 4년 전 | 1

답변 있음
Mathworks: it's time for a dark theme.
A dark theme saves power on OLED screens only. I assume, that most computers run Matlab with LCD screens, which do not profit f...

대략 4년 전 | 1

답변 있음
problems with "if statement"
The if command is not a loop. What is the purpose if the "for k" loop? Its body does not depend on k, so you can omit this loop...

대략 4년 전 | 0

| 수락됨

답변 있음
how to get convolution for two signals without using conv command
If you read the documentation, you find the mathematical definition of conv: doc conv The code is easy to implement using loop...

대략 4년 전 | 0

| 수락됨

답변 있음
how to get adress position inside vector
Copied from my comment as an answer: gravlo = zeros(427,1); for iel = 1:5 g = G(:, iel); m = (g ~= 0); gravlo(g...

대략 4년 전 | 1

| 수락됨

답변 있음
how to find a certain value in an array and return the value in the next column
A = [1 1.1; 2 2.2; 3 4.4]; x = 3; y = A(A(:, 1) == x, 2)

대략 4년 전 | 0

| 수락됨

더 보기