Answered
returning differences between two matrices
Index = find(A~=B)

8 years ago | 0

| accepted

Answered
Matrix Multiplication, row by row multiplication and column by column multiplication
*There is no in-built function but you can do this:* A = [ 1 2 3; 4 5 6; 7 8 9] B = [ 2 2 2; 2 2 2 ; 2 2 2] ...

8 years ago | 2

| accepted

Answered
Error: Index out of bounds
[num,txt,raw]=xlsread('11517_2004.xlsx') month=num(:,2) day=num(:,3) seconds=num(:,6) wind_speed=num(:,8) w...

8 years ago | 0

| accepted

Answered
How do I plot a contour map in Matlab?
*EDITED* x=linspace(-6,6,1000); y=x; [X,Y]=meshgrid(x,y) phi=X.*Y-Y contour(X,Y,phi)

8 years ago | 1

| accepted

Answered
system of equations (solve exponentiel equations
@Marwen you get error/s because the number of elements m,n and R,r are not the same in order to make the loop perform calculatio...

8 years ago | 1

| accepted

Answered
How linear system of equations can be solved in matlab
*Try this @Wajahat:* syms l p q syms f1(x) f2(x) %edited after sir Walters comment S1 = diff(f1) == l...

8 years ago | 0

| accepted

Answered
Solution of this Non linear Equation
syms x k=2; eqn=0.3==0.5*(x-0.022*k^2-5.6)*exp(-0.17*x); x=vpasolve(eqn)

8 years ago | 0

| accepted

Answered
Trying to produce a 4x40 table with the values of M, T, p, A.
*Try this:* % Constants gamma = 1.27; x = (gamma - 1)/(gamma + 1); % Initial Guesses T = 1; ...

8 years ago | 1

| accepted

Answered
Solve linear system by trial and error
*Try this:* syms x a b assume(x>b) eqn=x==a+b sol=solve(eqn,x,'ReturnCondition...

8 years ago | 0

| accepted

Answered
Reason for line not plotting?
Use *element wise operation* because as you defined *x* as a *vector* you should use dot it means each element is calculated one...

8 years ago | 0

| accepted

Answered
Why the given code is not running
It’s working for me . Make sure you have *partial differential equations toolbox* by typing ver in your command window.

8 years ago | 0

| accepted

Answered
Publish only graphs not the other output.
t=1:256; just suppress the output by putting *semicolon*(;)

8 years ago | 1

| accepted

Answered
Write MatLab code to translate the line: x(t)=-t y(t)=-t z(t)=0 0≤t≤1 to any new location in the x,y-plane. Plot together the original line and the new line for a translation of your choice.
syms x(t) y(t) z(t) x(t)=-t y(t)=-t z(t)=0 ezplot(x,y,[0 1]) %2d hold on ezplot3(x,y,z,[0 1]) %3d

8 years ago | 0

| accepted

Answered
How to calculate the coefficients of non-polynomial terms
syms x a=-9*cos(x)*4+x*9+4*sin(x) [C,T] = coeffs(a) %edited after John’s comment. It’s working for me

8 years ago | 2

| accepted

Answered
How to Publish matlab outout and code in pdf.
*Try this :* publish('myfile.m','pdf') *Remark: The default file format is .html* *Read the link below for better und...

8 years ago | 8

| accepted

Answered
Simple Question (I think) about finding zeros(and other number) in an array
*TRY THIS:* R = [ 1 2 0 1 0 2] R(R==0)=3 P = [ 1 2 3 4 5] Q = [ 5 4 3 2 5] Q(Q==P)=6

8 years ago | 2

| accepted

Answered
Whats wrong with this command?
*Use function handle correctly:* y = @(m) sqrt(9.81*m/0.25)*tanh(sqrt(9.81*0.25/m)*4)-36;

8 years ago | 0

| accepted

Answered
I am new to MATLAB and i have this question regarding execel
Try this: [num,txt,raw]=xlsread('exp2.xlsx') DESIRED_FUEL = num(:,3) for i = 1:numel(DESIRED_FUEL) if ...

8 years ago | 0

| accepted

Answered
how to tell if two elements in an array are identical
Use: isequal(A,B) %to check they are the same. Or A=1:5 B=[1 4 5 2 8] % to find where they are identical ...

8 years ago | 0

| accepted

Answered
how can i calculate the derivative of an x vector?
Try the below: syms f(x) f = 2*x.^4 - 5*x.^3 -12*x.^2 + 30*x +10 first_derivative = diff(f) second_d...

8 years ago | 0

| accepted

Answered
How to rewrite sin(x)/x as sinc(x)?
*Try :* syms x disp('A =') disp('sinc(x)') A=sinc(x); *Note: MATLAB just recognises the sinc(x) function as sin...

8 years ago | 1

| accepted

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

8 years ago

Answered
Symbolic Matrix has extra blank row
*OR TRY:* C = str2sym('[1 b; b 2]') *Edited after Sir walter‘s comment.*

8 years ago | 0

Answered
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
*No need for loop* alpha = 0.8; G = 2000; emissivity = 0.5; BoltzmannC =(5.67.^-8); T = 0; %valuesofT =...

8 years ago | 0

| accepted

Answered
How to convert a matrix like this?
Try this: A(A==0)=[]

8 years ago | 0

| accepted

Answered
r=e^(cos*theta)-2*cos(4*theta) graphic on MATLAB
I got the graph and it is the same in Wolfram alpha there is nothing wrong with it. %EDITED after the remark by JOHN D'ERRI...

8 years ago | 0

| accepted

Answered
How do I determine how many numbers are displayed as a result of this for-loop?
counter=0; for i=1:30 for j=1:30 for k=1:30 if(i*j*k ~= 900) ...

8 years ago | 1

| accepted

Answered
Issues Plotting Equation for a Range of Variable
*Use plot command because all the variables have values:* % Variables & Given clear; clc; ARone = 1; ARtwo = 5 ;...

8 years ago | 0

| accepted

Load more