Community Profile

##### Last seen: Today
3 599 total contributions since 2018

Communication through MATLAB is always better than arguing.

View details...

Contributions in
View by

Logic conditions are not equal in if statements
_"if expression, statements, end evaluates an expression, and executes a group of statements when the expression is true. An exp...

environ 6 heures ago | 0

How can I exclude an index from generating a random number?
W = zeros(N,N); for ii = 1:N for jj = 1:N if ii ~= jj Hj = randi(N);...

environ 6 heures ago | 0

| accepted

how to create three conditions in the same if statement?
if (C(i,1)<= A) || (N(i,1)> B) || (x>=y)

environ 6 heures ago | 0

How to assign variable to matrix positions
v = sym(A(:,2))

environ 6 heures ago | 0

Rounding error when dividing
sprintf("%.55f",a/b)

environ 15 heures ago | 0

Array indices must be positive integers or logical values.
Left hand side of the equation (n) and in right hand side D(n). And Ofcourse you don’t need a loop here ;)

environ 15 heures ago | 0

how to create incrementing arrays from each row of a matrix?
indices = arrayfun(@(x) Table.B(x):Table.A(x),1:size(B,1),'un',0);

environ 15 heures ago | 0

Error while using Size .
clear all clear size % this is what happens when you name a variable same as the function name ;)

environ 16 heures ago | 1

Vector as input for plotting function
x = input('Values of x:') % feed in for example [1,2,3] y = @sinc; plot(x,y(x))

environ 16 heures ago | 0

How to calculate derivative of function of inside of another function ?
doc syms doc diff

environ 16 heures ago | 0

How to combine row matrices to form table?
table(matrix) % where matrix is of size 15e2 X 3

environ 22 heures ago | 0

using MarkerSize in plot3
<https://www.mathworks.com/help/matlab/ref/plot3.html#mw_e90f6fb5-050e-4dda-8f6d-e0eaab1d995e>. My suggestion is to use two *plo...

environ 22 heures ago | 1

| accepted

create array and assign the values to proper locations
clear all; clc; t=16; t_all=[8 0 0 0 0 0 0 8]; z_all = zeros(size(t_all)); % preallocate z_all(1) = -t/2; ...

environ 22 heures ago | 0

question regarding figures in ploting graphs or surface
Use *hold on* and use *plot(...)* inside *figure(1)*

environ 22 heures ago | 0

Parentheses in code to make code more readable
You can’t create a paranthesis like that in a code. I suggest you to make those two conditional statements as two separate funct...

environ 23 heures ago | 0

| accepted

index in position exceeds array bounds
nne-1

environ 23 heures ago | 0

Why there is a difference between sortrows(A) and sortrows(A,1)?
I get the same results? >> Matrix Matrix = 1 1 4 2 4 4 4 5 2 2 3 1 ...

1 jour ago | 0

Store occurrences of an array in an equal sized array
[~,~,c] = unique(Input); Counts = accumarray(c,1); Output = Counts(Input)

1 jour ago | 0

Help with printing output
fprintf(' %.2f %.2f %.2f\n', [hours2(:).'; x(:).'; y(:).']) % Look documentation for adding spac...

1 jour ago | 1

how can i move cell components to new line
a = cellfun(@transpose, a, 'un', 0)

1 jour ago | 0

error: invalid range ; What could be the reason for the invalid error in the code I wrote? If the reason is inf, will they explain ?
Replace inf with a very large finite number for instance 1e6 . Note: You haven't defined K. The reason is simple , imagine yo...

2 jours ago | 0

Changing corresponding column based on condition, for a table.
T{ismember(T{:,10},'female'),9} = {'false'} % T your table

2 jours ago | 1

| accepted

How to replace a missing value in a table with a string?
Grouped_Weights.Country(cellfun(@isempty,Grouped_Weights.Country),:) = {'OTHER'}

2 jours ago | 0

| accepted

Why "-pi/8 <= 0.0099 < pi/8" return logical 0?
>> -pi/8 <= 0.0099 ans = logical 1 >> ans < pi/8 ans = logical 0 >> pi/8 <= 0.0099 ans = ...

2 jours ago | 0

| accepted

Somone can help me with unique and find function?
[lo,ix]= ismember(A,B,'rows') B = B(~lo,:) vector = ix(lo)

2 jours ago | 0

| accepted

3 jours ago | 0

Writing m function to be read by Livescript
https://www.mathworks.com/help/matlab/ref/function.html - you need to read more

3 jours ago | 0

| accepted