Answered
Why does a variable not update on button push with uitable?
uibutton() creates a button control and then immediately continues execution in the routine that calls uicontrol. It does *not* ...

4 years ago | 0

Answered
How to format a series of filenames with different characters as endings?
unitletters = 'a':'t'; units_filenames = "Channel01" + unitletters.'

4 years ago | 1

Answered
for loop to scan matrix and output a new matrix
matrix = [0; 1; 0; 0; 1; 1; 1; 1; 0; 0; 1; 1; 0]; matrix_new = [matrix(1); matrix(2:end) & ~matrix(1:end-1)]

4 years ago | 0

Answered
Calculate the datetime of 100k+ samples from a sensor and assign them to an array, quickly
Vectorize times = start + seconds((1:length(channel.Values)) * channel.dt); Question: should times(1) really be channel.dt aft...

4 years ago | 0

| accepted

Answered
How to use log scale with fimplicit
fimplicit(@(x,y) cosh((log(2)*(x-1))./((x+1).*y)) - (1/2)*exp(log(2)./y), [1 1000 0 1]) set(gca, 'XScale', 'log')

4 years ago | 1

Answered
How can I generate a binary matrix with a condition on the rows and columns?
M = 10; N = 5; k = 2; if M ~= N * k error('inconsistent sizes, would not be able to create a matrix with the required p...

4 years ago | 0

| accepted

Answered
How do I count the number of Functions in a Function Handle?
The number is always 1. Each function handle encodes exactly one function, which potentially returns a non-scalar output when ex...

4 years ago | 0

Answered
How to scan a matrix and execute specific commands depending on value.
matrix = [0 1 1 0 1 1 1 0 0 1] if matrix(1,1) output1 = nan; %his case is not defined, requires ...

4 years ago | 0

| accepted

Answered
Error in script using copylink
We had some network issues recently, but everything should be back to normal. ... but they are not back to normal. You need to ...

4 years ago | 0

Answered
How to create a table and change columns to rows and also give names
YourMatrix = rand(4,3); T = array2table(YourMatrix.', 'VariableNames', {'siddu', 'somu', 'ranu', 'bindu'})

4 years ago | 0

Answered
How do I get my license file if no mantion of it in the license Centre?
When you visit https://www.mathworks.com/mwaccount then on the line that lists your license, over to the right is there an icon ...

4 years ago | 0

Answered
"TS.Global" I got this as a part of a matlab code. Can anyone help to understand what does mean? I have seen this dot operator as a part of structure; is this mean the same?
The dot operator such as TS.Global can mean: That TS is a struct(), and Global is a field in the struct That TS is an object, ...

4 years ago | 0

| accepted

Answered
3D Matrix Interpolation, matrix(31x26x5) to matrix(9001x501x5)
https://www.mathworks.com/help/matlab/ref/interp3.html interp3() should do. You might perhaps need to use permute() to rea...

4 years ago | 0

Answered
Why is Matlab horrible on Linux?
Why? Because Linux is horribly fragmented with competing incompatible implementations and no central institution that is trying ...

4 years ago | 0

Answered
Is index out of range in a matrix just means an array of zeroes?
Suppose you took a copy of F, and you deleted from row 6 to end. And then you took the result and deleted row 1 to 4. Then what ...

4 years ago | 0

Answered
How to install purchased addon
First, in the command window, Help -> Licensing -> Update Current Licenses... Then use the Add-On Explorer, search for the prod...

4 years ago | 0

Answered
why this message error
The && operator is the "short circuit and" operator. A && B evaluates A, and if A is non-zero, then it evaluates B -- but if A i...

4 years ago | 0

Answered
Bound 3D function with asymptote
caxis([0 15])

4 years ago | 0

Answered
How to repeat value from start in buffer function Matlab
buffer() does not have any option for that. The following code would be quite a bit shorter if we knew for sure that the incomi...

4 years ago | 0

| accepted

Answered
I want to do a stop condition in ode45 that he demands dx=0
You need to carry around one more level of derivatives. AnonFun = @(t, x) [x(2); 5-2*x(1)]; Opt = odeset("Events", @myEvent)...

4 years ago | 0

Answered
How can I avoid pseudo random and confirm natural random ?
You cannot write a deterministic program that gives a truly random output. You need to measure some external event, and then you...

4 years ago | 1

Answered
What is returned by dir() when I pass a video in .mp4 format? Is there any alternative for dir() when I have a video to pass as argument?
curr_frames = dir(video_path); %remove folders including . and .. curr_frames = curr_frames(~[curr_frames.isdir]); %generat...

4 years ago | 0

| accepted

Answered
What is the difference between the logged in status or not when I use MATLAB?
When you are not logged in, you cannot use the tools in Help -> Licensing such as the tools to fetch an updated copy of your lic...

4 years ago | 0

Answered
Parfor loop classification "fix usage of indicated variable" error
BR = Binarizing_Rowsum(:,idx); BR(LEDdurIdx) = Light; Binarizing_Rowsum(:, idx) = BR;

4 years ago | 0

Answered
read file in folder with multiple files with similar names
In the restricted case that the files are being generated dynamically, then dinfo = dir('*.rpt*'); [~,newest_idx] = max(dateti...

4 years ago | 1

| accepted

Answered
Why is my subplot legend empty when I run my script using MATLAB 2021b but it is okay when run with R2020b?
legend_handle = legend('','','','','','','',''); At some point, legend() changed so that specifying '' as the legend stri...

4 years ago | 0

| accepted

Answered
With respect to .las files, how can I export a point cloud graphic to a .las file?
See https://www.mathworks.com/help/lidar/ref/lasfilewriter.html#mw_d90047ea-16e8-4cf5-b9a6-be2b68cb6679 for an example of writin...

4 years ago | 0

| accepted

Answered
charpoly does not work in may MATLAB version
requires Symbolic Toolbox r2012b or later

4 years ago | 0

Answered
Script Matlab to modify a sequence of G1 commands (G code)
in_filename = 'InputGcodeFileNameGoesHere.txt'; out_filename = 'OutputGcodeFileNameGoesHere.txt'; L = readlines(filename); L ...

4 years ago | 0

| accepted

Answered
How can I make these few lines a function?
Sure, just toss them in a function and call the function. I might suggest, though, function setup_plots(ax) if nargin < 1...

4 years ago | 1

Load more