Answered
syntax of this line tmp = cellfun(@(tbl) tbl(:, cellstr(dataVariables(ct))), trainDataNormalized, 'UniformOutput', false);% in RUL tutorial
@(tbl) tbl(:, cellstr(dataVariables(ct))) That syntax outputs the handle of an anonymous function. The anonymous function acce...

1 year ago | 0

Answered
An error occurred while running the simulation and the simulation was terminated
You have a MATLAB Function block in the lower left. It has s0 as input and ds0 as output. The 4th line of code for it is ds0=(s...

1 year ago | 0

Answered
How can I run a system-level simulation with 802.11be, in which I can use MRU?
https://www.mathworks.com/help/wlan/gs/802-11-standards-supported-by-wlan-toolbox-for-phy-modeling.html 802.11be™ support is cu...

1 year ago | 0

Answered
How to modify the mesh generated from meshgrid to create a rectangular void in the middle of the mesh
You might be better off taking a different approach. You might be better off decomposing a geometry If you follow the steps fro...

1 year ago | 0

Answered
Big Tiff Grayscale image looks unsharp/ Grayvalue is not shown properly
When imshow is asked to display an image that is larger than the figure size, it displays a downscale version of the image. The ...

1 year ago | 0

Answered
Import 2d image to 3d plot
The major problem with mixing 3d plots with images, is that image() is a strictly 2D object -- images disappear quickly when til...

1 year ago | 0

| accepted

Answered
Concerned that matlabFunction( ), when converting from symbolic to numerical, changes the sizes of matrices and vectors,
The expression is creating a 1 x 9 vector and reshape() it to 3 x 3. It may be a bit clumsy compared to directly generating a 3 ...

1 year ago | 1

Answered
Keep trailing zeros in an output file.
You cannot do that using writematrix() You can use dlmwrite with a 'precision' option. However, there is no option to adjust th...

1 year ago | 0

| accepted

Answered
Why does Matlab tell me that my ODE function returns a vector of length 12, while the length of my initial conditions vector is 6?
It is common for this to happen if you accidentally forget to index the variable, For example, dydt = [z(1).^2; z(2)-z...

1 year ago | 0

| accepted

Answered
Different color scale?
caxis([0 0.3]); That is affecting the current axis. caxis([0 0.5]); That too is affecting the current axis. Which app...

1 year ago | 0

Answered
reshape data to fit into surf/contour
You cannot do that. Consider using https://www.mathworks.com/matlabcentral/fileexchange/38858-contour-plot-for-scattered-data ...

1 year ago | 1

| accepted

Answered
How fmincon really work?
fmincon() always tries to minimize the result of the objective function. If the objective function returns negative values, then...

1 year ago | 0

Answered
How to get PWM on digital outputs pins of NI-6052E DAQ card?
Use a single Digital Output (Single Scan) block https://www.mathworks.com/help/daq/digitaloutputsinglesample.html Configure i...

1 year ago | 0

Answered
I have made a code which runs on matlab online but shows an error when run on my local pc
In R2022b, R2023a, and R2023b, https://www.mathworks.com/help/releases/R2023b/audio/ref/speech2text.html has a different calling...

1 year ago | 0

Answered
vpasolve doesn't work with roots for some equations
vpasolve((-1.2068e+21*x - 2.0765e+20)^(1/2)==-2.2185e+10,x) The left hand side involves a square root. The right hand side invo...

1 year ago | 0

| accepted

Answered
Matlab ilaplace not working properly
syms s sol = ilaplace(40/(s*(2*s^3 + s^2 + 6*s + 2))) disp(char(sol)) fullsol = rewrite(rewrite(sol, 'expandsum'), 'expandroo...

1 year ago | 1

Answered
I am trying to store all the values ​​of (f) and all the corresponding peaks of the resulting wave in two columns and then plot f vs. peaks, but there is a problem.
findpeaks() is returning different numbers of peaks for each frequency. clc clear all tspan = [0 5]; Ic = 0; A=1; resu...

1 year ago | 0

| accepted

Answered
how to plot cross hatch over correlation map?
In https://www.mathworks.com/matlabcentral/answers/2141881-how-to-make-a-specific-bar-to-be-hatched-with-a-specific-color#commen...

1 year ago | 0

Answered
Hi, how do I fix the error using superiorfloat? I've tried using double() for the subs() like I've seen suggested before but that caused an error.
eomFunc=odeFunction([thetadot,NOFFEOM],[theta,thetadot],mu,R,m,k); The syntax of odeFunction requires that the third parameter ...

1 year ago | 1

| accepted

Answered
Identifying Boundary Nodes in a Point Cloud
Your red nodes are sometimes immediately adjacent to your blue nodes. There is no way you will be automatically able to differen...

1 year ago | 0

Answered
Matlab 2024a not starting after Mac OS Sonoma 15.1 Update
I recently upgraded to MacOS Sequoia 15.1.1 (a day after upgrading to 15.1). I am now getting this message for all MATLAB versio...

1 year ago | 0

Answered
como resolver este en matlab
exp(x.^2 + y.^2)

1 year ago | 0

Answered
Solve 𝑔 ′ ( 𝑥 ) = 0 for z in terms of N, a positive integer
Let's try... Q = @(v) sym(v); syms f(x) g(x) G(z) syms z positive syms N integer assumeAlso(N, 'positive'); g(x) = 4*N*s...

1 year ago | 0

Answered
I want to draw pathline for two particle for a 2d problem
When you use griddedInterpolant, then your x must have all of its columns the same, and the row values must be sorted. Your y mu...

1 year ago | 1

Discussion


Known problems in MATLAB Answers
At the present time, the following problems are known in MATLAB Answers itself: Symbolic output is not displaying. The work-aro...

1 year ago | 6

Answered
plot csv with column names used automatically as x and y label
data = readtable("results.csv","TextType","string"); plot(data, data.Properties.VariableNames(1), data.Properties.VariableNames...

1 year ago | 0

| accepted

Answered
How could I make a script for this ecuation where i can solve for f?
syms f epsilon D Re Q = @(v) sym(v); eqn = 1/sqrt(f) == -Q(2.0) * log(epsilon/D/Q(3.7) + Q(2.51)/(Re*sqrt(f))) F = solve(eqn,...

1 year ago | 0

Answered
find intervals for both B and C which make the exponential function F converge to some points.
There is no point in calculating most of the F values since we are only interested in convergence. So we only test the last few ...

1 year ago | 0

| accepted

Answered
Attempting to interpolate with interp2 and getting errors about the sample point vector?
[x, y] = meshgrid(0:0.01:1, 0:0.01:1); x = [0 1 1 0]; y = [0 0 1 1]; You are overwriting the grids of data produced by meshgr...

1 year ago | 1

Load more