Answered
How to concatenate table elements?
all_times = vertcat(all_trials_on_date.coordinatetimes{:});

4 years ago | 0

| accepted

Answered
Use LaTeX for TickValues in a elegant way
Use TickLabelFormat: that way if you resize or pan the axes, the new labels will automatically be formatted properly. x = linsp...

4 years ago | 0

| accepted

Answered
Can I use matlab on multiple devices?
The R2022a license agreement says, 2.3. Student (i) Student Licenses may be licensed by students enrolled in deg...

4 years ago | 0

Answered
Error using plot Vectors must be the same length. Error in Eulerrk (line 54) plot (t,h(:,1),A,xR,yR(:,1))
h= 3600; That is a scalar. t = zeros (h,1); t is a vector of length 3600. for k = 2:13 t(k) = t(k-1)+3600; You assign ...

4 years ago | 0

Answered
NUMCLUSTERS must be a positive integer not greater than the number of data
After that dimension reduction, you are left with an array that has kd = 16 columns. For vl_gmm, each column is an independent s...

4 years ago | 0

| accepted

Answered
How can I Save data from for loop into an array
d4 = 10; d1vals = -15:8.75:20; d2vals = -12:6:12; d3vals = 0:6:24; Theta4vals = -90:45:90; Theta5vals = -45:56.25:180; T...

4 years ago | 0

Answered
How to use the x-axis coordinate as a reference in a set of data points, divide 5 coordinate points at equal intervals, and find these points. Thanks a lot for your answer.
linspace(first_x, last_x, 5) if the "5 coordinate points" includes the first and the last point. If the requirement is 5 poin...

4 years ago | 0

Answered
ERROR: FSOLVE requires all values returned by functions to be of data type double.
fun2 = @(u) ((1./u).*log(double(expint(2,sym(-PsByN_0.*u)))).*exp(-PsByN_0*u));

4 years ago | 0

| accepted

Answered
Not enough input arguments. Error in odefun (line 2) y1 = y(1); Error in bvp4c (line 5) sol =bvp4c(odefun,bcfun,solinit);
As we told you in one of your other questions, the first two parameters to bvp4c need to be function handles, not function names...

4 years ago | 0

Answered
Avoid the Optimization crash
This is a proof of concept, that shows if you are willing to modify the cost from sum of abs() to sum of squares, then you can c...

4 years ago | 0

Answered
Error using trainNetwork (line 184)
What would happen if one of the layers requested an array larger than the size stored in your cells, XTraining{1} and so on? In...

4 years ago | 0

Answered
Need help in creating mask?
blockproc() need not return an array the same size as the nominal input window. It would be valid, for example, to tell it you w...

4 years ago | 0

| accepted

Answered
Errors with audiorecord function
Yes, it is possible. However, you cannot achieve your goals by doing that. You are in the middle of a callback that fires every...

4 years ago | 1

| accepted

Answered
Replacing symbolic subexpression with unspecified arguments
syms a1 a2 a3 a4 x1 x2 x3 x4 y y = sin(a1 * sin(x1)) cos(children(y, 1))

4 years ago | 1

| accepted

Answered
Why ode45 can not solve while ode15s can solve?
You have a "stiff" system of equations. The equations wobble a lot and ode45 has to take very small steps to try to follow the w...

4 years ago | 1

| accepted

Answered
export() live scripts not working
files = dir(fullfile(dirName,'*.mlx')) You use the folder information when you do the dir() but you only extract the n...

4 years ago | 0

Answered
After getting a correct score, use a for loop and if statement to compute and print a letter grade.
your code goes function while if end end end if g >= 95 If you match the end to their co...

4 years ago | 0

| accepted

Answered
How to create contour plot to show height?
See https://www.mathworks.com/matlabcentral/fileexchange/38858-contour-plot-for-scattered-data

4 years ago | 0

Answered
How to convert a table data to numeric data without loosing data
data = table([1;2], [3;4], [5;6], ["Healthy";"Disease"], 'variablenames', {'Energy', 'variance', 'std', 'class'}) [data.class, ...

4 years ago | 0

Answered
I want to convert the resulting 8 bit binary bits back to quantization levels
b=dec2bin(x',8)'; okay, assuming that x is uint8, that code will return 8 rows and however many columns are needed b=b(:)';%bi...

4 years ago | 1

Answered
When you enter something invalid, your program should not stop, and should keep asking for a number
while true read a grade test if it is valid if it IS valid, then use the break command if it is not valid th...

4 years ago | 0

Answered
Create array based on a loop setting a variable
If you want corresponding rows, then you can simply use P = I .* U; with no loops needed. This syntax multiplies "correspondi...

4 years ago | 1

| accepted

Answered
Help with for loops
l=length(H); for i=[1:l] % dispersion relation to find wave length [ka,L] = dispersion_relation(T(i),d); That always uses co...

4 years ago | 0

Answered
Is there a built in function like MinPeakHeight but for maximum numbers?
Work with the negative of the signal; the most negative original signal would become the most positive on the transformed signal...

4 years ago | 0

Answered
Adding repetitive number to web address.
r2(k) = webread( "https:/........=" + B(k) + ", " + C(k)); assuming that the syntax is something followed by a literal equa...

4 years ago | 0

| accepted

Answered
Newton Raphson Liquid-liquid extraction
n = 8 x0 = (0:n:1) That is a vector of length 1, because it is "start at 0, add 8 at a time, stop if you exceed 1". Your code...

4 years ago | 0

Answered
How to apply looping in iteration process ?
If your initial guess is not between about -1 and about +40 then you might not get a solution. filename = 'https://www.mathwork...

4 years ago | 0

Answered
The professor asked to remake the C++ code in MATLAB.
T = (10:10000)'; Large vector. 9991 x 1 elements. qH21 = (2.7.*(10.^-11).*(T.^0.362) + 3.46.*(10.^-11).*(T.^0.316)).*0.5; qH1...

4 years ago | 0

Answered
Index in position 1 exceeds array bounds. Index must not exceed 1.
Dataset 'kspace' Size: 320x640x20x16 MaxSize: 320x640x20x16 Datatype: H5T_COMPOUND ...

4 years ago | 0

| accepted

Answered
Specifying encoding as a function
function out = TheFunctionName(birincifaz, ikincifaz) However: This will return an array whose first dimension is at least 50 ...

4 years ago | 1

| accepted

Load more