Answered
How to replace all newline characters in a string with a space?
Since this sounds like it may be a homework assignment, I'll only give a hint. There's one function in the "Create, Concatenate,...

6 years ago | 0

Answered
Checking if a value is equal to zero or no ? with the problem of floating-point numbers !
Testing for exact, down-to-the-last-bit equality with == can be problematic. Instead, the general recommendation is to check for...

6 years ago | 0

Answered
Help With Conditonally variant Anonymous function.
Let's say val is 2. So if Z is between 1 and 500 B2 should be -2, if it is between 501 and 1500 B2 should be 2, and if it is bet...

6 years ago | 0

Answered
How do I call a function which I have defined within a class?
When you call a non-Static method of a class, at least one of the inputs to that method must be an instance of that class. With ...

6 years ago | 1

Answered
Different results with same code??
m_s = 2000; %(kg) Sprung mass m_u = 200; %(kg) Un-sprung mass k_s = 200000...

6 years ago | 0

Answered
Creating M histograms from an NxM table on separate plots
A = 2*randn(1e4, 6) + 5*(0:5); T = array2table(A); for k = 1:width(T) subplot(2, 3, k) histogram(T{:, k}) end Note...

6 years ago | 1

| accepted

Answered
Operands on table, comparison with numbers
say I fix one of the row indices " ind" .If I try say find(A(ind,:)>0.1) I get the error : "Operation '>' not supported for oper...

6 years ago | 0

| accepted

Answered
How to extract rows based on column values in a matrix?
This wasn't an option when the question was asked originally but depending what you're trying to do with those "3 matrices", usi...

6 years ago | 0

Answered
Matlab 2020b does not find Xcode Mac OS Big Sur
I would try following the instruction in the warning message. Run Xcode (outside of MATLAB) and when it prompts you to accept th...

6 years ago | 0

Answered
Create new column in table based on another column value
Let's start with a sample table. T = table([123; 345; 234], [9; 1; 3], 'VariableNames', ["ID", "Occurrences"]) Fill in the Uni...

6 years ago | 1

| accepted

Answered
Sorting time in 1 hour time slots.
minutesPerDay = minutes(days(1)); m = minutes(randi(minutesPerDay, 100, 1)); n = datetime('now'); t = n + m; h = histogram(t...

6 years ago | 0

Answered
Generalized Eigenvalue Problem - Hessenberg Matrix
It sounds like you might want to use the syntax of eigs whose first input is Afun, a function handle that returns the result of ...

6 years ago | 0

Answered
Error using inputdlg: dialogs disabled
Line 2 of the inputdlg function included in MATLAB is a comment describing the function. Therefore you have written or downloade...

6 years ago | 0

Answered
Creating a symbolic array
If you want an array of q's: syms q A = repmat(q, [5 5])

6 years ago | 0

Answered
Installing matlab 2019 on windows
Searching using Google for "exec error 22" found this MATLAB Answers post that appears to be relevant.

6 years ago | 0

Answered
I can't create a graph from the adjacency matrix
I suspect you've created a digraph object and stored it in a variable named graph, which will prevent you from calling the graph...

6 years ago | 0

| accepted

Answered
How to find minimum value ,correspondings to a column ,in an output ?
The second output from the min function will help you retrieve the corresponding element of x.

6 years ago | 0

| accepted

Answered
tan verses tand error in loop
phi_o(i) = (atand((0.5*g*t(i).^2*((1/3)*(2*sqrt(Vx(i)/Vx_o)+1)))/x(i))); ...

6 years ago | 0

| accepted

Answered
How to get a function from user without knowing its symbols
The symvar and str2sym functions listed (along with many others) on this documentation page may be of interest to you.

6 years ago | 0

| accepted

Answered
how do I right x^2 in MATLAB
To raise a square matrix to a power use the ^ operator. To raise each element of an array (the array need not be square or even...

6 years ago | 2

Answered
Why is line visible while its parent axes is unvisible?
Because the line has its own Visible property and that property's value is 'on'. fig = figure; ax = axes(fig, 'Visible', 'on')...

6 years ago | 0

Answered
How can I create bins in Matlab using predefined counts?
histogram('BinEdges', [2, 4, 6, 8], 'BinCounts', [20, 5, 13]);

6 years ago | 0

| accepted

Answered
Function keeps getting errors, how to fix?
What is the full and exact text (everything displayed in red and/or orange in the Command Window) of the error and/or warning me...

6 years ago | 1

Answered
How can I get the solve function to display values instead of solutions containing other variables?
syms d D N_a D_od = 1.9; %outer diameter of coil C = 7; eqn1 = (D_od-d)/d == C; solve(eqn1,d) This second line of code solv...

6 years ago | 0

| accepted

Answered
I am not able to use the function minibatchqueue. I get the error as "Unrecognized function or variable 'minibatchqueue'."
According to the documentation page this function was introduced in Deep Learning Toolbox in release R2020b. Do you have this to...

6 years ago | 0

Answered
2016b installtion problem
What happened when you tried pressing Yes? If that still did not work, you may want to try restarting the installer in case tha...

6 years ago | 0

Answered
How and when can future versions of the custom deep learning layer improve flexibility?
If you wish to request that the custom deep learning layer functionality be enhanced with specific functionality (like the abili...

6 years ago | 0

| accepted

Answered
Arg max of a function
The operator + does not and cannot return two output arguments. Nor can its functional form, plus. As a hint, take a look at th...

6 years ago | 1

Answered
Creating a Matrix of random numbers
possibleValues = [-1, 1]; desiredSize = [5 6]; A = possibleValues(randi(numel(possibleValues), desiredSize)) This assumes you...

6 years ago | 2

| accepted

Answered
My polyfit function is displaying NaN
There are at least three potential difficulties with your code. The first difficulty is that you're passing log10 of the Displac...

6 years ago | 0

Load more