Beantwortet
How to calculate a triple sum with a dependent index using Matlab?
What is the intention of: if n==0 || N This conditio is TRUE, if n is zero or N is not zero. I assume you want: if n==0 |...

mehr als 4 Jahre vor | 1

Beantwortet
Problem with plotting dots in points
The loop does not depend on the loop counter: i = 8; % <- this is the index in all iterations for c = 1:8 I assume you mean:...

mehr als 4 Jahre vor | 0

Beantwortet
Convert portion of matrix under the diagonal to column vector
A = [ 1 2 3 4 5; ... 2 1 2 3 4; ... 3 4 1 2 5; ... 0 3 2 1 2; ... % 0 inserted 5 4 3 2 1]; s = ...

mehr als 4 Jahre vor | 1

Beantwortet
All combinations of cell arrays
A = [1 2 3; ... 1 2 4 ; ... 1 3 5]; B = [1 6; ... 4 5]; C = [repelem(A, size(B, 1), 1), ... repmat(B...

mehr als 4 Jahre vor | 0

Beantwortet
How do I use MATLAB app designer to display a command window for my app?
This is "gun-shot programming". Please read the documentation: doc fprintf doc fopen Both commands do not write text to a GUI...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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,...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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? "...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 2

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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);...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

Beantwortet
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 ...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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, ...

mehr als 4 Jahre vor | 1

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

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

mehr als 4 Jahre vor | 1

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

Mehr laden