
Walter Roberson
I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location. I am currently caught up to T0099119; if you are waiting on a reply from me for an older issue, please send me a reminder.
C, MATLAB, Shell, Perl, Fortran
Spoken Languages:
English
Statistics
RANK
1
of 262,996
REPUTATION
124,582
CONTRIBUTIONS
34 Questions
55,632 Answers
ANSWER ACCEPTANCE
52.94%
VOTES RECEIVED
16,281
RANK
of 18,000
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
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 ...
5 hours ago | 0
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 ...
5 hours ago | 0
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'})
6 hours ago | 0
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 ...
6 hours ago | 0
"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, ...
7 hours ago | 0
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...
13 hours ago | 0
Why is Matlab horrible on Linux?
Why? Because Linux is horribly fragmented with competing incompatible implementations and no central institution that is trying ...
14 hours ago | 0
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 ...
19 hours ago | 0
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...
19 hours ago | 0
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...
1 day ago | 0
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...
1 day ago | 0
| accepted
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)...
1 day ago | 0
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...
1 day ago | 1
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...
1 day ago | 0
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...
1 day ago | 0
Parfor loop classification "fix usage of indicated variable" error
BR = Binarizing_Rowsum(:,idx); BR(LEDdurIdx) = Light; Binarizing_Rowsum(:, idx) = BR;
1 day ago | 0
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...
1 day ago | 1
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...
1 day ago | 0
| accepted
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...
1 day ago | 0
| accepted
charpoly does not work in may MATLAB version
requires Symbolic Toolbox r2012b or later
2 days ago | 0
Script Matlab to modify a sequence of G1 commands (G code)
in_filename = 'InputGcodeFileNameGoesHere.txt'; out_filename = 'OutputGcodeFileNameGoesHere.txt'; L = readlines(filename); L ...
2 days ago | 0
| accepted
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...
2 days ago | 1
I need to show the area of objects found using bwconncomp for successive frames
areaOfObject{k} = [stats.Area]; You have multiple objects per frame, so stats is a nonscalar structure. stats.Area would then b...
2 days ago | 0
| accepted
High frequency generation ( 100K ) and above using Simulink and deploying it on Arduino
If you are using the USB connector, and if you are transfering each sample individually, not many people manage to get more than...
2 days ago | 0
How to remove other color line in graph ?
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1092850/image.png'; rgb = imread(filename); mask = ...
2 days ago | 0
| accepted
Axes of polar plot
%when you use polar() the lines are given hidden handles ax = gca; LL = setdiff(findall(ax, 'Type', 'line'), ax.Children); Yo...
2 days ago | 0
| accepted
Script not running for different variable size.
The problem is that you stop counting at 10 overlaps. As the time increases, the number of overlaps increases, until you get to ...
2 days ago | 0
Create matlab code for memory game.
Techniques for filling in the hidden board gorp = repmat('27=@/',1,3) gorp = gorp(randperm(numel(gorp))) gorp = reshape(gorp,...
2 days ago | 0
Create an image from x and y locations with greyscale value
The following code does not assume that every grid location will have a value given, and also it does not assume that the coordi...
2 days ago | 0
| accepted