Answered
Need help resolving this error message
global seg_length m g k b_type num_nodes beam_init connect_mat row_index col_index seg_length_matrix You create a global named ...

3 years ago | 0

Answered
Fitting data using lsqcurvefit
There is nothing to fix. Ideally the sum of squares would be exactly 0, which would require a perfect fit of parameters to the...

3 years ago | 1

Answered
Exiting due to infeasibility: 1 lower bound exceeds the corresponding upper bound. Error using test13 (line 43) Optimization failed to converge
[f_rad_min, f_comm_min, 0, gamma_min, gamma_min, 0.1] Those are your lower bounds [f_rad_max, f_comm_max, P_max, gamma_max, ga...

3 years ago | 1

Answered
How to insert different size matrices into each row of a zero matrix
newvalues = as appropriate M(end+1, 1:length(newvalues)) = newvalues;

3 years ago | 0

Answered
Error using stem X must be same length as Y.
currenta=out.ScopeData7(:,2); We are not given any information about what out is or size the various ScopeData* are. We can spe...

3 years ago | 0

| accepted

Answered
zoom image interactively maintaining a square zoom field
ax = gca; hZoom = zoom(ax); setAxesZoomConstraint(hZoom, 'x'); hZoom.ActionPostCallback = {@SquareZoom, ax.XLim(1), ax.YLim(1...

3 years ago | 1

Answered
I'm trying to compare a cell array to a single vector.
DestinationData = {'ATL','DAL','FFT','JBU','SWA';... 'EWR','UAL','FFT','JBU','NKS';... 'PHL','AAL','FFT','JBU','SWA';....

3 years ago | 0

| accepted

Answered
making sqrt file without using sqrt function
You can code Hero's Method; see https://blogs.sas.com/content/iml/2016/05/16/babylonian-square-roots.html Each step iteration ...

3 years ago | 0

Answered
Matlab Code: Eval and Sub2ind
Alternate code avoiding eval(): ngrid=20; ndim=2; idnames = {1,20}; ANS = sub2ind(ngrid.*ones(1,ndim), idnames{:})

3 years ago | 1

Answered
Extract first and last row of each subarray in a cell array
output = cellfun(@(C) C(unique([1, end]), :), YourCellArray, 'uniform', 0) The unique() is there to prevent it from accidentall...

3 years ago | 1

Answered
How can I pass a large function into ODE45?
Your code needed a bunch of fix-ups. You defined a bunch of anonymous functions but then code them without passing any parameter...

3 years ago | 0

| accepted

Answered
How to make marker size bigger in legend for scatter plot?
In order to do this, you might need to use the undocumented second output of legend(). When you call legend() with multiple outp...

3 years ago | 1

Answered
Can I use other hardware targets besides Speedboat with Simulink Real-Time
For roughly the last 5 years, Simulink Real-Time has only supported Speedgoat hardware. If you were to use anything other than...

3 years ago | 0

Answered
block matching image issue
Your attached code (but not your posted code) has imshow (F2_recons - e1) where both of those arrays are double precision and ...

3 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
h(k+1) = -r(1:k)'*inv(toeplitz(R(1:k))); % Levinson-Durbin recursion When k becomes 2, toeplitz(R(1:k)) becomes 2 x 2, and ...

3 years ago | 0

Answered
How to add information from a matrix to a figure
weights = [0.62 0.69 0.59 0.63]; for idx = 1 : length(weights) thisstr = "\Pi/m = " + weights(idx) + "W/kg"; plot(o...

3 years ago | 0

| accepted

Answered
How to stop running code once conditions are met?
found_duplicate = false; for k = 1:n-1 if F(n) == F(n-k) found_duplicate = true; break ...

3 years ago | 0

Answered
Using hmm for protein profile analysis - Error using swalign
swalign does not support '.' or '*' It supports *-ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz together with '?' which is ...

3 years ago | 0

| accepted

Answered
how to loop through a folder
for j = 1:length(file_list) originalImage = imread(fullfile(dir_in, file_list(j).name)); [this_folder, this_basename, ...

3 years ago | 0

Answered
use .m file
If a .m file is a script file (first executable word is not function or classdef ) then you cannot directly call any functions d...

3 years ago | 0

| accepted

Answered
Randomly generate discs in 3d space
Generate disks centered around (0,0,0) . Apply a random rotation around two of the axes -- disks are invariant around the third ...

3 years ago | 0

Answered
bypass an "if" within another using a flag
You might mean either of two different things: First possibility: a=5; b=4; c=3; d=2; if a>b if FLAG == 1 && b>c ...

3 years ago | 1

| accepted

Answered
Generating random points between two n-dimensional boxes
One way that does not require any rejection: for each location to be generated, first generate a random integer 1 to 3^n-1 usin...

3 years ago | 0

Answered
how to load data from wireless insite to matlab
https://github.com/isabelapt/wi-parsing-matlab -- Matlab Code to parse the *.p2m files from Wireless Insite

3 years ago | 0

Answered
How to change text color of a table's cell
See uistyle and addstyle. Note that those are valid for uitable within uifigure but not for traditional figures

3 years ago | 0

| accepted

Answered
how can i resolve the "index in position 2 is invalid" error in line 99? the code works fine when N=15 but i need N=17.
timegap=tfinal/(rept-1); rt=0:timegap:tfinal; rt(1)=1; rt(rept)=tfinal Timegap is not certain to be an integer, so rt can co...

3 years ago | 0

| accepted

Answered
why Tsun=5780 and numE=1000?
Tsun is the approximate temperature of the Sun, which is said to have a surface temperature of 5772 K I would need more context...

3 years ago | 0

Answered
Calling a function in App Designer
filename = app.EditField1.Value; characteristic = app.Editfield2.Value; environment = app.Editfeild3.Value; [x, y] = results(...

3 years ago | 0

Answered
I'm trying to solve heat governing equation using finite element method but i'm having error that I can't figure it out.
decsg documentation says For a rectangle, the first row contains 3, and the second row contains 4. The next four rows contai...

3 years ago | 0

Load more