Answered
Solving differential equations in terms of unknown coefficient?
Not sure what you are trying to do but see if this does what you want: syms x(t) y(t) z(t) A=sym('A',[1,9]) syms(A) ...

7 years ago | 0

Answered
How to save a matrix as text file using "save" without scientific notation?
Use *dlmwrite()* with precision

7 years ago | 2

| accepted

Answered
Plotting graph of negative values of array in integral2 with 3 variables
Not sure what you are trying to do but see if the below does what you want: u0= 4*pi*10.^-7; N1 = 15; N2 = 15 ; L1 = 8.215*1...

7 years ago | 1

| accepted

Answered
Finding pythagoras triples when only c is known
C2 = c^2; [X,Y]=ndgrid(1:200); XY=[X(:).^2,Y(:).^2]; XY(sum(XY,2)==C2,:) % first column is a and the second b which is square...

7 years ago | 1

Answered
Why is the code dont stoping when 'x' is equal to 10?
You need to know that it‘s because of floating-point error because *.1* is not exactly *.1* to check sprintf('%.32f',.1) %...

7 years ago | 0

| accepted

Answered
disp() output in decimal form
Use double() or vpa() it looks like the results are from symbolic calculations.

7 years ago | 1

| accepted

Answered
max and min values in an array
See if this does what you want , first we split into 16 separate rows each and then we conquer in the third dimension: [m,n]=si...

7 years ago | 2

| accepted

Answered
How can i remove one element from this matrix
In the question you asked second row has 4 elements while the rest has 5 elements, algebra?? You can't have hole in a matrix so...

7 years ago | 0

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
When I press enter to enter a *tag* to a question *MATLAB Release* field gets erased.

7 years ago | 1

Answered
How to solve a non-linear equation system as function handle with fsolve?
qini = zeros(1,6); % Initial guess ci = fsolve(@funec,qini) % fsolve with the function handle, unknown variab...

7 years ago | 1

| accepted

Answered
Create a matrix table from two matrices
% Assuming first column of A & B is already arranged in descending order U = sort(unique([A(:,1);B(:,1)]),'descend'); [AA,BB]...

7 years ago | 0

| accepted

Answered
How can I compare the values of different columns of the same matrix
According to your claim it always returns 0 is because let's break it down: 1) ZL(1,1)==ZL(1,2) will return a logical array ma...

7 years ago | 0

Answered
leading zeros on matrix variable
Agree with John, S = ""+A; Max = max(cellfun('prodofsize',S)); Result = cellfun(@(x)regexprep(strjoin([""+zeros(1,Max-numel(x...

7 years ago | 0

Answered
Problem with ode45
The name of the file that f is saved should be *f.m*

7 years ago | 1

Answered
I have two equations that are difficult to solve, so I am using fsolve to get the sol. But while running the program I encountered the error .Please help me or tell other way to solve these equations.
guess = [0.28 0.0244]; result = fsolve(@eqs,guess) function fcns = eqs(z) F1 = z(1); f1 = z(2); fcns(1) = ...

7 years ago | 0

| accepted

Answered
How to get value from cell?
<https://in.mathworks.com/help/matlab/ref/mat2cell.html?searchHighlight=Mat2cell&s_tid=doc_srchtitle>

7 years ago | 0

| accepted

Answered
How can I input complicated function
f = @(n)... % the rest you can figure it out

7 years ago | 0

Answered
find how many times same element is repeated
A=[9,8;7,6;1,2;2,4;3,4;3,4;4,7;6,7;8,6;9,8;7,6]; a = unique(A,'rows'); R = zeros(size(a,1),1); for k = 1:size(a,1) R(k) ...

7 years ago | 0

| accepted

Answered
Why is plot(x,y=0) not giving a line at y=0?
Stephen’s answer is the way I would do it but the explanation for the not satisfactory result of your code: y=0; You create a ...

7 years ago | 3

| accepted

Answered
how to write equation gvsm=((2.*|A|.|V^2).cosd(delta+alpha))-|V|)./(B.^2) in MATLAB coding
modA should be abs(A) and the sizes of each variable should be ( *compatible* ) the same to perform that operation.

7 years ago | 0

Answered
Intergrate a array over Tb?
Perhaps you want to use *cumtrapz()* or *trapz()*.

7 years ago | 0

Answered
how to write cosdelta alphain MATLAB coding
cosd(bsxfun(@plus,Delta+Alpha)) % assuming units are degrees else use cos()

7 years ago | 0

Answered
maximum number and indexing
maxk(a,2)

7 years ago | 1

Answered
counting no .of temperature less than 32 in array
v=[45 21 32 31 51 12]; threshold=32; numfreeze = freezing(v,threshold) % function call function nu...

7 years ago | 0

Answered
how to choose the intended answer of an equation that has 4 solutions?
R = double(M2); Wanted = R(R>0 & R<1)

7 years ago | 0

| accepted

Answered
create a cell array with incrementing values
regexp(cellstr(sprintf('a%d ',1:25)),' ','split') <https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-varia...

7 years ago | 1

| accepted

Answered
How do I remove NaN values from a matrix and retain matrix shape?
X(all(isnan(X),2),:)=[]

7 years ago | 1

| accepted

Answered
compare elements of a matrix
No loops needed: if all(sum(t)==total) disp('Yes') end if all(sum(t,2)==total) disp('Yes') end

7 years ago | 1

| accepted

Answered
concatenate values from matrix and cell array
strcat(""+mtric,{'-'}, string(cell_array)) % string array cellstr(strcat(""+mtric,{'-'}, string(cell_array))) % cell ar...

7 years ago | 1

Load more