Answered
How do you create a symbolic function of symbolic vectors?
Have a look at this: syms x [1,2] syms y [1,2] f(x,y) = x.^2 + y.^2 Notice that the resulting function is a function with fo...

3 years ago | 0

Answered
Extract a portion of character
It would be possible to strip those values down to the milliseconds and nanoseconds as a simple text operation. However I did no...

3 years ago | 0

Answered
I changed from a home license to an individual license on my mac but the command window banner still says "home use". How do I fix this?
Individual licenses for R2022b on Mac are stored in ~/Library/'Application Support'/Mathworks/MATLAB/R2022b_licenses . Here, ~ i...

3 years ago | 0

| accepted

Answered
how to plot contour ?
T = readtable('HB2B_2530.csv','PreserveVariableNames',true); Vx = table2array(T(:,:));%X TTT = Vx(:,10:13); A = unique(TTT...

3 years ago | 0

| accepted

Answered
Matlab - Modelformed.NumNeighbors
Your data has 145 rows. You can create a loop from 1 to (145-1)=144 neighbours, asking to predict with each of those number of n...

3 years ago | 0

| accepted

Answered
Error using mesh : Z must be a matrix, not a scalar or vector
n=100; p=linspace(1/3,1,n); r=linspace(0,1/3,n)'; f1=1-2*p; f2=(1-2*p)./(2*p); f3=(1-p).^2./(2.*p); f4=(1-p)/2; inside=(r...

3 years ago | 0

Answered
Solving set of equations using fminunc
convert each equation to an expression by taking the left side minus the right side. Now create a residue function by taking the...

3 years ago | 1

Answered
How to make calls to static methods independent of packaging structure (name)?
Known work-arounds: * preprocessing the source code to convert some kind of relative reference to absolute reference before e...

3 years ago | 0

Answered
why do i get an error in my code?
* before all of this your MATLAB path might be very messed up * you might have a variable named "path" in your mat file that is...

3 years ago | 1

Answered
Is there a way to visualize this data?
Yes. resample() the second and third variables to the same size as the first variable. Now plot3() the variables against e...

3 years ago | 0

| accepted

Answered
Solving non linear ode using ode45
P.A- pho.a.y.g= pho.a.y.(y'') P and A are nonzero finite constants as are everything else except y and y'' y(0)=0 P*A...

3 years ago | 0

Answered
Error using vitdec For hard decision type, CODE must contain only binary values.
vitdec -- "Convolutionally decode binary data by using Viterbi algorithm" But your data is not binary. See https://www.mathwor...

3 years ago | 0

Answered
Index exceeds the number of array elements.
I can find 2theta as /entry/DASlogs/2theta but there is no main anywhere in the dataset. I can find /entry/instrument but there...

3 years ago | 0

| accepted

Answered
definition of mask function
The 'mask' input for a 5 x 3 x 6 array for that function should be a 5 x 3 logical array.

3 years ago | 0

| accepted

Answered
I am making a form with SVM algorithm to do a brain tumor classification but when i uplode a photo from the data set i get this error Error using horzcat
img is RGB. mean() by default operates along the first non-singular dimension, so mean() of an RGB image gives back 1 x columns ...

3 years ago | 0

Answered
How do I pull data between specific dates like Vlookup formula in Excel?
Create a timetable and index it with a timerange https://www.mathworks.com/help/matlab/matlab_prog/subscript-into-times-of-time...

3 years ago | 1

Answered
Get array from a function
[x, y] = titanium; gEqn = 'a*exp(-((x-b)/c)^2)+d'; startPoints = [1.5 900 10 0.6]; [fj,gof,output] = fit(x',y',gEqn,'Start', ...

3 years ago | 0

| accepted

Answered
Desktop icons shrinking on a mac
The official documentation is at https://www.mathworks.com/help/matlab/creating_guis/dpi-aware-behavior-in-matlab.html My susp...

3 years ago | 0

Answered
Changing the number of iterations at runtime
I suspect you are talking about for loops. The answer for those is that that cannot be done. You can modify the loop index, bu...

3 years ago | 0

Answered
Need suggestion -- which interpolation method should I use?
Consider https://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint_nans However, this depends upon the idea that the d...

3 years ago | 0

| accepted

Answered
Solving probability problems with MATLAB
SampleSize = 100; NumBad = 10; NumTrials = 10000; [~, randomized] = sort(rand(SampleSize, NumTrials), 1); num_bad_in_first_f...

3 years ago | 1

Answered
How to draw the both sided arrow lines.
https://www.mathworks.com/help/matlab/ref/annotation.html#br2_upx-1-lineType annotation('doublearrow', x, y) Be careful! The ...

3 years ago | 1

| accepted

Answered
Unable to change Marker Size in Scatter Plot
When you choose the scatter plot option at the top of the screen, that executes a new call to scatter() with appropriate paramet...

3 years ago | 1

| accepted

Answered
Why my centroid are at different position?
x1 = stat(66).Centroid(1,1); y1 = stat(66).Centroid(1,1); x2 = stat(1).Centroid(1,1); y2 = stat(1).Centroid(1,1); Your...

3 years ago | 0

Answered
define a 15X15 matrix for a graph.
Use graph() or digraph() with the s, t input form. s should contain a list of edge source node numbers and t should contain the ...

3 years ago | 0

Answered
How to pass arguments to exe and return output from exe in MATLAB
Your C program expects 16 bit binary inputs to main. When a C main program is called, it is called with either two parameters ...

3 years ago | 0

Answered
How to plot Vector in 3d using two angles and initial point
You have initial coordinates, and you calculate radius based on those coordinates. That is equivalent to saying that the initial...

3 years ago | 0

Answered
Substitute variable into equation using MATLAB
T = readtable('myfile_new.csv','NumHeaderLines',1); % skips the first three rows of data You read into table format, getting o...

3 years ago | 1

Answered
I am receiving the error "Error using filter. Invalid data type. Input arrays must be numeric or logical." in the code
when you load() and assign the output to a variable, the output becomes a struct with one field for each input variable in the ....

3 years ago | 0

| accepted

Answered
Error reading dates when using readtable function
N = dateshift(datetime('now'), 'start', 'minute') N N - seconds(eps(0)) You can see that for display purposes, MATLAB does no...

3 years ago | 0

| accepted

Load more