Answered
Inconvenience working with matlabFunction
Sorry, but matlabFunction() is not going to change about this, as it involves a fundamental model of what symbolic variables *ar...

4 years ago | 0

Answered
How to delete all lines in a text file after a certain word matches
keyword = 'KEY'; newtext = "LINES DELETED" + newline + "Yes indeed, deleted" + newline; %this part has to do with fetching y...

4 years ago | 0

| accepted

Answered
Matlab coder support for fitdist
Do not expect it in the next MATLAB release.

4 years ago | 0

Answered
Mulitply diffrent numbers in a vector by a corrsponding number.
V = [1 6 8 10 14 20 25] mask = V <= 10; V(mask) = V(mask) * 10; V(~mask) = V(~mask) * 100; V

4 years ago | 0

Answered
How to do a Fourier analysis with a mask?
Use [A,MAP,ALPHA] = imread(...) syntax. You can then threshold based on alpha to determine whether to include a pixel or not. ...

4 years ago | 0

Answered
How to convert this equation to matlab code ?
syms epsilon_t0_2 E_0 n sigma sigma_0_2 sigma_1_0 n_prime_0_2_1_0 E_0_2 = (sigma_0_2 * E_0)/(sigma_0_2 + 0.002*log(E_0)) part1...

4 years ago | 1

| accepted

Answered
Is there a way to read 16bit float(mantissa 8bit)bin file?
str = "00 00 07 00 F8 FF FD FF 01 00 01 00 01 00 FF FF 46 C0 B9 40" A = sscanf(str, "%2x", [1 inf]); if mod(numel(A), 2) == 1;...

4 years ago | 0

| accepted

Answered
When reading a spectrogram, why is a power of 20 considered higher than 120
Those are not 20 and 120: those are -20 and -120 .

4 years ago | 1

Answered
interpolation in Matrix to have at the end equidistance points based on X
format long g M=[ 1 2 1 3 5 6 6 11 17 7 12 19 11 24 25]; M_interp = interp1(M(:,1), M, min(M(:,1)):max(M(:...

4 years ago | 0

| accepted

Answered
A MATLAB function with mixed scalar and vector as inputs fail
h_LL = reshape([t3.*t8.*t13.^2.*(-1.0./1.0e+2),t36,t26,t25,t31,t36,par1.^2.*t5.*t7.^2.*t8.*(-1.0./1.0e+2)-par1.*t3.*t6.^3.*t8.*t...

4 years ago | 0

| accepted

Answered
imag(A) = 0, but A ~= real(A). How is this even possible?
A matrix does not equal itself if it contains nan

4 years ago | 0

Answered
How can I compare with daily precipitation data from the day before?
diff(A, [], 1) will calculate the second row minus the first row, then the third row minus the second row, then the 4th row m...

4 years ago | 0

| accepted

Answered
How to find maximum element of particular column in a array
max(A(:, [2 4 6]),[],1) The ,1 forces it to take maximum along columns even if there is only one row

4 years ago | 1

| accepted

Answered
cell array to 2d array
cell2mat(YourCell(:)) Or in this case vertcat(YourCell{:})

4 years ago | 0

Answered
Error in resizing heatmaps in a subplotted figure
Your ylabel_array or your null_y_array are string() arrays, which that File Exchange Contribution does not expect. You will need...

4 years ago | 0

| accepted

Answered
What is the best function of the following shape?
Looks like tansig

4 years ago | 1

Answered
Can I load a file without single quotes?
What you describe suggests to me that you are using someone else's code that has been written in the form of a function. The per...

4 years ago | 0

| accepted

Answered
How to choose a random number between 3 values in matrix?
If you have the statistics toolbox you could use randsample(). But otherwise: choices = [3, 6, 7]; m = 4; n = 3; %for examp...

4 years ago | 1

| accepted

Answered
How to speed up the calcualtion of a system of ode via ode45?
Your system is "stiff". Switch to ode23s() or ode15s() and it will complete in less than 1 second.

4 years ago | 0

| accepted

Answered
How to merge two .fig images using hold on command?
You cannot use hold on to merge figures. fig70 = openfig('voronoi70.fig'); fig80 = openfig('voronoi80.fig'); mfig = copyob...

4 years ago | 0

| accepted

Answered
How to fix "matrix dimensions must agree" error
t=(0:0.02:1) That is a row vector u=[t-1/2;t-1/2]; That is a row vector pasted on top if itself. The result is two identical ...

4 years ago | 0

| accepted

Answered
Matlab Online - change of the current folder
You can use the cd command at the command line prompt portion. Or, you can click the triangle of the "Current Folder" part of t...

4 years ago | 0

Answered
Efficient way to read variable column number data from a mixed-format text file?
I suggest using fileread() and text processing. For example, S = fileread('YourFile.cif'); S = regexprep(S, {'^.*?(?=^ATOM)', ...

4 years ago | 0

Answered
Invalid use of .^. The power operator when used on Simscape custom component
Both the base and the exponent must be dimensionless Your base is G_unit which has unit 1/Ohm . This violates the constraint th...

4 years ago | 0

Answered
Unrecognized function or variable 'rosbagreader'
That requires ROS toolbox, R2021b or later rosbag() only requires R2019b or later.

4 years ago | 0

| accepted

Answered
How to convert the equation to MATLab code
If F < 1 then since t>=1, F^t would be less than 1 and the second summation would have no work to do. If F > 1 then because T...

4 years ago | 1

Answered
fscanf problem and get invalid file identifier
* possibly the fopen() failed * possibly the fopen worked but you did not assign it to a variable named in * possibly the fope...

4 years ago | 0

| accepted

Answered
Is it at all possible to solve this equation algebraicly for V? How would the solution look? Thank you.
No, the solution set is the roots of a long polynomial of degree 7. There is no general solution for polynomials of degree 5 or ...

4 years ago | 0

| accepted

Answered
How do I create a 2-D plot with a matrix that contains data points and a matrix that contains class labels?
see <https://www.mathworks.com/help/stats/gscatter.html>

4 years ago | 1

Load more