Answered
Error: Function definitions are not permitted in this context.
You can‘t run a code which has function in command window. See https://www.mathworks.com/help/matlab/matlab_prog/calling-functio...

7 years ago | 0

Answered
Need help with Operands operators must be convertible to logical scalar values
use & instead of &&

7 years ago | 0

| accepted

Answered
How do I convert a variable that is already in rectangular form to polar?
see resource https://www.mathworks.com/matlabcentral/answers/113701-how-do-i-convert-from-complex-numbers-a-bi-to-a-polar-form-r...

8 years ago | 2

Answered
Graph the planes 2x − 3y + 4z = 2 and x − z = 1 on the same plot.
use hold on %after first fimplicit3 and then use fimplicit3 for the next equation That is syms x y z fimplicit3(...) %dots...

8 years ago | 0

Answered
Replace values in one column based on the content in several other columns.
A=[ 1 1 1 1; 1 2 1 0; 2 1 1 3; 2 1 2 4] %perhaps? B=[ 1 1 1 1; 1 2 1 0] index=ismember(A(1:3,:),B,'rows') A(index,:)=somevalu...

8 years ago | 0

Answered
Multiple functions in one file
why not ? see https://www.mathworks.com/help/matlab/matlab_prog/nested-functions.html https://www.mathworks.com/matlabcentral/...

8 years ago | 0

Answered
Is there a function/command call that does 2-d logical
a = rand(3) logicals=a>0.5 %tells where they are located in matrix values=a(logicals)

8 years ago | 0

Answered
What Is the third value when reading an image
https://www.mathworks.com/help/matlab/ref/imread.html#btv1pto-1

8 years ago | 0

Answered
Replace elements in array based on position
syms a b c d e f g %requires symbolic toolbox A=[a b c d e f g] finalarray=subs(A,{'a','c','g'},{'1','2','6'})

8 years ago | 0

| accepted

Answered
how to converte a date from gg\mm\aa to gg nomemese aa ?
https://www.mathworks.com/help/matlab/ref/datetime.html#mw_e5a21fa8-24fe-4412-ae91-e89f7242f731 datetime('02/12/1994','Format...

8 years ago | 0

| accepted

Answered
I cant get my nested if statements to work, is the indentation wrong?
your nested if statements will only work if and only if val3 less than or equal to 3 otherwie it wouldnt so does the other condi...

8 years ago | 0

Answered
Index in position 1 is invalid. Array indices must be positive integers or logical values.
x=1:5 %an example to make you understand x(1) x(0) %this will throw the same error as you have

8 years ago | 3

Answered
Matlab script to Python conversion for operator colon ":"
http://mathesaurus.sourceforge.net/matlab-python-xref.pdf

8 years ago | 0

Answered
why condition become true in if/esle ?
see https://www.mathworks.com/matlabcentral/answers/429435-matlab-value-error-while-creating-vector#answer_346543 for explanatio...

8 years ago | 0

| accepted

Answered
How would I find the roots of given function y=x^4-x-4
roots([1 0 0 -1 -4])

8 years ago | 0

| accepted

Answered
How to change workspace contains signals, storage class through scripting ?
https://www.mathworks.com/help/simulink/ug/simulink-data-class-extension-using-matlab-class-syntax.html#d120e214091

8 years ago | 0

Answered
How to upload folder in matlab online(https://matlab.mathworks.com/)
https://www.mathworks.com/matlabcentral/answers/302201-how-do-i-share-a-folder-in-matlab-drive

8 years ago | 2

Answered
ploting variables from a data structure
see https://www.mathworks.com/help/matlab/ref/structfun.html p = structfun(@plot,S); %an example p(1).Marker = 'o'; % number ...

8 years ago | 0

Answered
atand and atan2d
Just a guess try: blue = atan2d(y/x,x)

8 years ago | 0

Answered
find the number of occurances
x=[ 1 1 1 3 3 4 4 4 6 7] u = unique(x) %unique numbers y=histc(x,u) %occurences bonus = [u; y]' %relation between them

8 years ago | 1

Answered
Can I trust the results about the ODE: Unable to meet integration tolerances?
https://www.mathworks.com/matlabcentral/answers/101581-why-do-i-receive-a-warning-about-integration-tolerance-when-using-the-ode...

8 years ago | 0

Answered
How do l let the user re-enter input if the original input is unacceptable?
look for goto file exchange which does the same work you require

8 years ago | 0

Question


Why the editing privilege is gone?
I can see that the font style and some ither fratures have changed in forum , good to see that . As well the editing status is a...

8 years ago | 1 answer | 0

1

answer

Answered
add column to a matriz
newmatrix=[u wp]

8 years ago | 0

| accepted

Answered
Matlab value error while creating vector
Read <https://www.mathworks.com/matlabcentral/answers/428770-why-isn-t-matlab-counting-this-as-equal-to-1#answer_345891> ...

8 years ago | 0

| accepted

Answered
Does Simulink PLC Coder support "mldivide, \"
<https://www.mathworks.com/matlabcentral/answers/338323-use-mldivide-in-simulink#answer_265330>

8 years ago | 0

Answered
unitconv do not work
see <https://www.mathworks.com/help/symbolic/unitconvert.html> It's *unitConvert* not *unitconv* Ixx= unitConvert(Ixx,...

8 years ago | 0

Answered
i need help with this?
Make a note a loop is not needed to do this operation , logical indexing is better and efficient, you got error becuaw you didn'...

8 years ago | 0

| accepted

Load more