Question

Why doesn’t livescript display the results in LATEX form?

When I was using 2017a the results of symbolic operations resulted in LATEX form but why does it not happening in 2018b? Is ther...

6 Tage ago | 0 answers | 0

Answered

How to make a variable an even number?

Is your question "How to check if a variable consists of even numbers?" Google "even number mod matlab"

How to make a variable an even number?

Is your question "How to check if a variable consists of even numbers?" Google "even number mod matlab"

6 Tage ago | 0

| accepted

Answered

How can i link same index of two vectors vectors?

[~,index]=max(V); Value = M(index)

How can i link same index of two vectors vectors?

[~,index]=max(V); Value = M(index)

6 Tage ago | 1

| accepted

Answered

storing data in a matrix from a nested loop

[m,n]=size(d1); [m1,n1]=size(d2); z = permute(reshape(d1.',1,n,m) - d2,[2,1,3]) d12 = reshape(z,n,[]).' % Or if you prefer...

storing data in a matrix from a nested loop

[m,n]=size(d1); [m1,n1]=size(d2); z = permute(reshape(d1.',1,n,m) - d2,[2,1,3]) d12 = reshape(z,n,[]).' % Or if you prefer...

6 Tage ago | 0

Answered

I don't know if matlab is calculating this properly

Result = mysum(2,10) % just call it like this doc function % to know how to use functions function SUM = mysum(...

I don't know if matlab is calculating this properly

Result = mysum(2,10) % just call it like this doc function % to know how to use functions function SUM = mysum(...

6 Tage ago | 1

Answered

How to compute logs in MATLAB

help log edit: you already had the answer in your question before editing your question which was after this answer being g...

How to compute logs in MATLAB

help log edit: you already had the answer in your question before editing your question which was after this answer being g...

6 Tage ago | 0

Answered

Count the number of same elements in an array

[~,~,ix] = unique(V); C = accumarray(ix,1).'

Count the number of same elements in an array

[~,~,ix] = unique(V); C = accumarray(ix,1).'

7 Tage ago | 2

| accepted

Answered

Index in position 1 is invalid. Array indices must be positive integers or logical values. Z=null(R,'r')

This is the exact reason why people shouldn’t name variables as the names of inbuilt functions!! clear null % to clear...

Index in position 1 is invalid. Array indices must be positive integers or logical values. Z=null(R,'r')

This is the exact reason why people shouldn’t name variables as the names of inbuilt functions!! clear null % to clear...

7 Tage ago | 1

| accepted

Answered

how to plot this function?

x=@(t)cos(t)+cos(2*t) y=@(t)sin(2*t) % you can use fplot() help fplot doc fplot

how to plot this function?

x=@(t)cos(t)+cos(2*t) y=@(t)sin(2*t) % you can use fplot() help fplot doc fplot

7 Tage ago | 0

| accepted

Answered

How to extract individual vectors out of a matrix and save them with different names?

What you're doing is not a good idea see https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not...

How to extract individual vectors out of a matrix and save them with different names?

What you're doing is not a good idea see https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not...

7 Tage ago | 0

| accepted

Answered

Filling gaps in time series with Nan

d = (data(1,1):data(end,1)).'; ix = ismember(d,data(:,1)); new_data = [d,nan(numel(d),1)]; new_data(ix,2) = data(:,2)

Filling gaps in time series with Nan

d = (data(1,1):data(end,1)).'; ix = ismember(d,data(:,1)); new_data = [d,nan(numel(d),1)]; new_data(ix,2) = data(:,2)

7 Tage ago | 0

| accepted

Answered

How to load data files from different folder using for loop?

Use \\ instead of \

How to load data files from different folder using for loop?

Use \\ instead of \

8 Tage ago | 1

| accepted

Answered

apply condition on Matrix?

Just use logical indexing "==" to see the values equal 1 and use nnz() and then use >= T if you get 1 it's true else false. hel...

apply condition on Matrix?

Just use logical indexing "==" to see the values equal 1 and use nnz() and then use >= T if you get 1 it's true else false. hel...

8 Tage ago | 1

| accepted

Answered

Removing char in a mixed string column so only numerical values are left?

Wanted = str2double(regexprep(LED,'LED','')) % ^^^--- is your columns of data containing mixed data

Removing char in a mixed string column so only numerical values are left?

Wanted = str2double(regexprep(LED,'LED','')) % ^^^--- is your columns of data containing mixed data

8 Tage ago | 1

Answered

How to plot a graph from matrix each row elements should start plotting from row number

I'm not certain what you want though , see if the below satisfies your needs: plot(matrix)

How to plot a graph from matrix each row elements should start plotting from row number

I'm not certain what you want though , see if the below satisfies your needs: plot(matrix)

8 Tage ago | 0

Answered

Can somebody explain me this answer?

The code copies the third element of a as 2 by 2 matrix, see the below example: >> a a = 1 2 3 4 >>...

Can somebody explain me this answer?

The code copies the third element of a as 2 by 2 matrix, see the below example: >> a a = 1 2 3 4 >>...

8 Tage ago | 1

| accepted

Answered

Why does setdiff answer depend on order of arguments?

bob not in bill (nothing unique all elements of bob belong to bill) help setdiff

Why does setdiff answer depend on order of arguments?

bob not in bill (nothing unique all elements of bob belong to bill) help setdiff

8 Tage ago | 0

Answered

How do i plot this in matlab

y = -(sin(pi/2*cos(x))Operator missing here(-pi/2*sin(x))./cos(x)

How do i plot this in matlab

y = -(sin(pi/2*cos(x))Operator missing here(-pi/2*sin(x))./cos(x)

8 Tage ago | 0

| accepted

Answered

remove row in A by referencing on another matrix, B, with true or false to produce another matrix c

Use the same approach shown in your previous questions! C = A(B==false,:)

remove row in A by referencing on another matrix, B, with true or false to produce another matrix c

Use the same approach shown in your previous questions! C = A(B==false,:)

8 Tage ago | 1

| accepted

Answered

remove specific rows by referencing on the first digit of each row.

B = A(~A(:,1),:)

remove specific rows by referencing on the first digit of each row.

B = A(~A(:,1),:)

8 Tage ago | 0

| accepted

Answered

Answer is not displayed on static text

https://in.mathworks.com/matlabcentral/answers/479420-answer-is-not-displayed-on-static-text#comment_743486

Answer is not displayed on static text

https://in.mathworks.com/matlabcentral/answers/479420-answer-is-not-displayed-on-static-text#comment_743486

8 Tage ago | 0

| accepted

Answered

How to find single index values in a matrix?

https://in.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html - read it for better understanding Linear...

How to find single index values in a matrix?

https://in.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html - read it for better understanding Linear...

8 Tage ago | 1

| accepted

Answered

How to find several slopes

help diff % calculates the change between each instances

How to find several slopes

help diff % calculates the change between each instances

8 Tage ago | 0

| accepted

Answered

i want my graph to start from 0 after writing this code it starts from 1

% No loops needed: x=0:51; y=-0.0349*(exp(0.548*x*0.1))+8.549*(exp(-0.548*x*0.1))+0.119; plot(x,y) "plot(Y) plots the col...

i want my graph to start from 0 after writing this code it starts from 1

% No loops needed: x=0:51; y=-0.0349*(exp(0.548*x*0.1))+8.549*(exp(-0.548*x*0.1))+0.119; plot(x,y) "plot(Y) plots the col...

8 Tage ago | 0

| accepted

Answered

Error "Undefined function or variable"

[maBar_1, wBar_1, alphaBar_1] = hcEqPt(22, 0.6, 0.095, 47500, 0.0026); fprintf('At v=22, ma = %d, w = %d, alpha = %d',...

Error "Undefined function or variable"

[maBar_1, wBar_1, alphaBar_1] = hcEqPt(22, 0.6, 0.095, 47500, 0.0026); fprintf('At v=22, ma = %d, w = %d, alpha = %d',...

8 Tage ago | 0