Community Profile

photo

Walter Roberson


Last seen: Today
50,569 total contributions since 2011

I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location.

Contact

Walter Roberson's Badges

  • Roberson Cup
  • Most Accepted 2019
  • Most Accepted 2018
  • Solver
  • First Review
  • Most Accepted 2017
  • 36 Month Streak
  • Most Accepted 2016
  • Most Accepted 2015
  • Most Accepted 2011
  • Most Accepted 2012
  • Most Accepted 2013
  • Thankful Level 4
  • Grand Master
  • Revival Level 4

View all

Contributions in
View by

Answered
Error using load Unable to read file 'iris'. No such file or directory.
When you do not give a file extension when you load(), then the only one MATLAB will search for is .mat . Your file is a .data f...

35 minutes ago | 0

Answered
How to save a txt file in matlab with the specified name I want?
fullname = fullfile('directory path', [filename '.txt']); save(fullname, 'A', '-ascii')

2 hours ago | 1

| accepted

Answered
Using Matlab for solving symbolic equations
you have 11 equations in about 17 variables, and you ask to solve the equations in terms of one of the variables. When you are u...

3 hours ago | 0

Answered
Error using odearguments (line 113) Inputs must be floats, namely single or double.
You need to use matlabFunction() to turn your symbolic expressions into numeric code. Be sure to use the 'vars' option to contro...

3 hours ago | 0

Answered
Does not properly read csv file
readcell() instead of readtable(). Your file mixes data types.

3 hours ago | 0

| accepted

Answered
Galois field to binary matrix conversion (BCH encoding)
NC = noisycode.x; That will be uint32 with min 0 and max 0, so you can logical() it or double() it or uint8() it as appropriate...

10 hours ago | 0

Answered
How to add constraints to simulannealbnd minimization
You cannot add constraints directly. However you can set AnnealingFcn to the handle of a function that only generates points tha...

10 hours ago | 1

Answered
Plotting a non linear equation.
format long g t_min = .3, t_max = .8 syms theta_opt m real a = sin(theta_opt).^2; b = (cos(theta_opt) - sin(theta_opt)...

10 hours ago | 1

| accepted

Answered
Input #2 expected to be a cell array, was struct instead.
You need arrayfun() instead of cellfun() for that purpose. This assumes that in time Code2Model will be a non-scalar struct ar...

11 hours ago | 0

Answered
How to get all possible combinations of three independent data sets?
A = [A_x A_y]; B = [B_x B_y]; C = [C_x C_y]; ABC = [A;B;C]; D= [D_x D_y]; E = [E_x E_y]; F = [F_x F_y]; DEF = [D;E;F]...

11 hours ago | 2

| accepted

Answered
guesses of parameters in fmincon do not satisfy the constraints in nonlcon
Solvers can violate bounds constraints with some options: https://www.mathworks.com/help/optim/ug/iterations-can-violate-constr...

11 hours ago | 0

Answered
Find the index range of ones/trues?
test_vector = [0,0,1,0,0,1,1,0,1,1,1,0,1,1,1,1]; starts = strfind([0 test_vector], [0 1]); stops = strfind([test_vector 0], [1...

11 hours ago | 0

Answered
Improving speed of readtable
Where all of the time is spent on the TreatAsEmpty command (because of having many zero entries?) No, that is not what is happe...

12 hours ago | 0

| accepted

Answered
Device number can that used with one license
Home and Student licenses: one device only (Individual) Academic licenses: two devices activated (Individual) Standard (Commer...

15 hours ago | 0

Answered
Fzero function error in matlab
x = fzero(@(x) (707.34/(x-x^2)*(1+0.1*(10.589*(1-x)/x).^0.75)-(x-x^2)*9778.608 , 0.2) 1 2 1 2 3 2 3 4 ...

1 day ago | 0

Answered
How do I find unknown parameter from an equation?
eqn = @(c) z - a.*b./(c.*d); c = fsolve(eqn, GUESS) This assumes that the equation is complex enough that you cannot just me...

1 day ago | 0

| accepted

Answered
Issues with audiorecorder function in Matlab online R2020a?
As mentioned by @Eddy Armas At least up to R2021a, MATLAB Online does not support audio input. MATLAB Online does support som...

1 day ago | 0

Answered
When combining multiple photos, I want to have one matrix that shows only the highest value at each pixel's place.
Start with the first image, and copy it to the proposed output. For each additional image, figure out how it overlaps the curre...

1 day ago | 0

Answered
How to increase matlabFunction length limit
matlabFunction(C, 'vars', {q, qdot, alpha, l, rho}, 'file', strcat(dpath,'/C_fun'), 'Optimize', true); Index exceeds the number...

1 day ago | 0

Answered
How to make multiple execution of a code by loop ?
Replace x=array2table(x) y=array2table(y) TABLE=[A B x y]; TABLE.Properties.VariableNames(1:4) = {'A','B','x','y'}; with ...

1 day ago | 0

Answered
How can I covert serious of grey scale images to jet images
in_ext = '.png'; out_ext = '.png'; projectdir = 'path/to/files'; %can be '.' outdir = 'path/to/store/output'; %must be dif...

1 day ago | 0

Answered
how to speed up code
If I read the code correctly, then numused = sum(track_length_DNS); mycell_tracks_index = mat2cell(index_tracks_matching(1:num...

1 day ago | 0

| accepted

Answered
Reading a .dt2 file in MATLAB
https://www.mathworks.com/matlabcentral/fileexchange/25897-read-dted-elevation-data looks like it should support .dt2 files.

1 day ago | 0

Answered
Can you use matlab code within an Arduino sketch?
MATLAB code cannot be included in an arduino sketch. With current releases, you can target MATLAB code to be deployed to Raspb...

1 day ago | 0

Answered
FSOLVE requires all values returned by functions to be of data type double.
syms a b c d e X=input('numb of carbon atoms in fuel'); Y=input('numb of hidrogen atoms in fuel'); Z=input('fuel to air ratio...

1 day ago | 0

Answered
How to break a while loop to another one?
while outer test outer stuff quit_middle = false; while middle test middle stuff while inner test i...

1 day ago | 0

Answered
Exporting the output into a .txt file
You could evalc() the code, getting back a character vector, that you then wrote to a file. You could fopen() a file, and fpri...

2 days ago | 0

Question


Identify Simulink blocks by shape and ports?
Is there a facility to help people figure out what block shapes are which Simulink / Simscape blocks? I see people posting Simu...

2 days ago | 0 answers | 0

0

answers

Answered
I'm having problems copying a 4-D array
https://www.mathworks.com/help/releases/R2017a/matlab/ref/imread.html?searchHighlight=imread&s_tid=doc_srchtitle#inputarg_idx T...

3 days ago | 1

Answered
How can I best receive data from a web hook into Matlab?
The URL for the webhook could be connected to a webserver on your host that accepted the request (such as with PHP or ASP), cons...

3 days ago | 0

| accepted

Load more