Answered
Input of linebreak into sprintf?
a = sprintf('A\nA') % Or a = sprintf('A%cA', char(10)) % %s would work also % Use |newline| instead of char(10) in modern ...

7 years ago | 2

| accepted

Answered
uiputfile dont work anymore
"it doesn't create anything" could mean, that you get an error message or that existing files are overwritten. Even if you repea...

7 years ago | 0

Answered
Encoding user information into a numeric format
No, this cannot work. You can compress the text e.g. in ZIP format, but this cannot guarantee a length of 10 to 15 bytes for the...

7 years ago | 0

Answered
Problem using RESHAPE function
This cannot work. There is no number, which satisfies 340029 = X * 215 * 395 , but reshape does not change the number of element...

7 years ago | 1

Answered
writecell errors with nested cells
It depends on what the contents of the cell elements is. Posting just the size does not allow to know this. Perhaps all you need...

7 years ago | 0

Answered
how to get back to the main Function after a for loop is finished
Loading data inside by load() consumes a lot of time. Doing this repeatedly is a bad idea and slows down the processing massivel...

7 years ago | 0

| accepted

Answered
How do you fix a 'function_handle' error?
Where is thze function ODESolver1 stored? In an M-files called "ODESolver1.m"? Is this stored in a folder, which is contained in...

7 years ago | 0

Answered
How can i update plots with button after setting values with sliders?
Simply remove the code from updating the graphics from the callbacks of the sliders. Then add this code in the callback of the b...

7 years ago | 0

Answered
interpolation outside the range
"Interpolation" works inside the given range of data only. If you want a point outside, this is an "extrapolation", which is ins...

7 years ago | 0

Answered
How to create an undo button for image colorization?
An "Undo" button does not depend in any way from the applied computations. All you have to do is to store the formerly existing ...

7 years ago | 0

Answered
confusion matrixes of 2 dimension
Please read the error message: The first two inputs must be numerical vectors. The documentation explains the allowed inputs exh...

7 years ago | 0

Answered
How can I solve and plot a function with more than 3 arguments all having different array length.
alfa = reshape(0:5:40, [], 1); fi = reshape(20:8:40, 1, []); teta = reshape(0:2:10, 1, 1, []); beta = reshape(1:0.1:2, 1, 1...

7 years ago | 1

| accepted

Answered
Scatter3 does not display points correctly
I do not see any problem in the screenshot and do not understand, what you consider as "wrong" or "misleading". Which axis do y...

7 years ago | 0

Answered
Error using trace in matrices manipulation
The error message is clear: T = [ ... 5.1000 3.5000 1.4000 0.2000 6.3453 3.2126 4.3695 1.4453 ...

7 years ago | 0

Answered
Specified folder does not exist error for all folders
This might be a problem with OneDrive folders. Did you see this already: https://www.mathworks.com/matlabcentral/answers/354614-...

7 years ago | 0

Answered
Find the max value and index of each interval in a big matrix
To be sure: Would this loop solve your problem? XX = [1 2 3 4 5 1 3]'; YY = [10 10 10 20 20 30 20]'; uXX = unique(XX)...

7 years ago | 0

| accepted

Answered
How can I create a random array like the example below?
A = [1 1 2 2 7 7 9 9]; B = [3 5 6 8 10 11]; nA = numel(A); nB = numel(B); rB = B(randperm(nB, nB)).'; iA = randi([1, nA...

7 years ago | 0

| accepted

Answered
How exactly is atan2 implemented in matlab?
Which problem do you want to solve? The easiest way to see the source code to create the atan2 function is to apply for a job a...

7 years ago | 0

Answered
Why are computational results in MATLAB sometimes different on different machines and how can I prevent this has a high impact on my application?
Look at the ACOS function: Matlab uses the FDLIBM method published at netlig.org, as state in the doc. Now compile this C-source...

7 years ago | 3

Answered
How to writematrix with a different sheet name in a for loop matlab
What about AzizSheetName ={'Joint Angle R.Ankle.X', 'Joint Angle R.Ankle.Y', 'Joint Angle R.hip.X', 'Joint Angle R.hip.Y', 'Joi...

7 years ago | 0

| accepted

Answered
Need a code to print this in command Window
fprintf('A\n', ... 'B C\n', ... 'D E F\n', ... 'G H I J\n', ... 'K L M N O\n', ... ...

7 years ago | 0

Answered
How to compare a cell to a single value?
mask = strcmp({behaviours_currframe.ID}, ID)

7 years ago | 1

| accepted

Answered
Creating an array of strings for mapping indexes to values
What about: stationmap = {'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6', 'S7', 'S8', 'S9'} % Alternatively: % stationmap = sprintf...

7 years ago | 0

| accepted

Answered
How can I use the numeric value of a Physic variable
You can find some toolboxes and functions for handling physical units in the FileExchange: https://www.mathworks.com/matlabcentr...

7 years ago | 0

| accepted

Answered
Finding minimum of a function using dichotomous search
The first line is bad already: function [F] optimal = dichotomous(F,a,b,n) I guess, this is meant: function optimal = dichoto...

7 years ago | 0

Answered
Simulating ODEs with array inputs
Of course the integrator must crash. Check the used dimensions: What is the size of dydt = (eta*P+(T_o-y)/R)/C; when you defin...

7 years ago | 1

Answered
How can I log the branch that I am currently working in?
[status, msg] = system('git branch'); Then use msg afterwards.

7 years ago | 1

| accepted

Answered
DLL module not found upon compiling
Does this help? https://www.mathworks.com/matlabcentral/answers/221845-why-is-my-matlab-utility-not-recognizing-windows-sdk-7-1#...

7 years ago | 0

Answered
readtable xlsx with date
What about: varTypes = {'datetime','datetime','char','double','double','double'} ; What exactly does "use it for plots" mean...

7 years ago | 1

| accepted

Answered
How to calculate y=|sin(x)| * x^2?
Do not use "min" and "max" as variables, because this will be confusing, if you want to call the Matlab functions min() and max(...

7 years ago | 0

| accepted

Load more