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

4 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

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

4 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 2

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 1

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

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

4 years ago | 1

Answered
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 years ago | 0

Answered
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 years ago | 1

Answered
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 years ago | 1

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

| accepted

Load more