Answered
reflection coeff. value
*Maybe try the following:* n=[1 2 3 4 5 6]; ki=2.*pi.*n k=1.2 kz=sqrt((ki.^2-k.^2)) for i= 1:length(kz)-1 RTE(i)=(kz...

8 years ago | 1

| accepted

Answered
How to find magnitude of an array of 17 vectors
*Use :* norm(x) %x - is a vector, norm syntax calculates the magnitude of the vector *AN EXAMPLE: * X= rand(10...

8 years ago | 0

| accepted

Answered
EXP function with imaginary number
I tried and got the same result too even the result in Wolfram is the same.

8 years ago | 0

| accepted

Answered
matlab shows only one answer to my equation
EB = [38;26;29;33;22]; Ea = [40;32;35;44;44]; Kb = EB + Ea; T = [0.48; 0.48; 0.48; 0.48; 0.48]; Z=exp(-EB./Kb.*T);...

8 years ago | 0

| accepted

Answered
issue with copying the figure to MS Word
Instead of copying the figure why can’t you attach the picture like the above in ms word? h=plot(t,y) saveas(h,'filena...

8 years ago | 0

| accepted

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

8 years ago

Answered
How can I display the output in for loop as a vector
for i=1:length(pl_no) if(pl_no(i)>100) x(i)=year_disc(i) end end *Remark:* Instead of *x* you should ...

8 years ago | 0

| accepted

Answered
index exceeds array bound meaning?
It means that the index number is more than the array elements. *An example:* x=[1:10] x(11) Your array has 10...

8 years ago | 3

| accepted

Answered
how to add the first row all the odd columns by step of 2 odd columns
Try this: a1=a(:,1:2:end) %for odd columns a2=a(:,2:2:end) %for even columns oddcolumns=sum(a1,2) ...

8 years ago | 1

| accepted

Answered
How can I have multiple outputs for a function evaluating various elements?
function IF=myfunction(P,T) a=1.28+15.*(1./P+0.05)+exp(100./T); %USE ELEMENT-WISE OPERATIONS IF=500+a; disp(IF) %not ...

8 years ago | 0

| accepted

Question


str2sym and sprint command is not working , was working before but not now.
Is it because of a bug?

8 years ago | 1 answer | 0

1

answer

Answered
how to split a dataset based on values from one column
column7 = datasets(:,7) for i = 1:numel(column7) if column7(i) > 25 above25(i) = column7(i) elseif...

8 years ago | 0

| accepted

Answered
How do i plot the equation below in matlab
syms x y ezplot(x^2*y^3+2*x+2*exp(4*y)-1==0) *Note: Make sure you have the symbolic toolbox*

8 years ago | 1

| accepted

Answered
How to plot in a for loop using real numbers?
q = 4000; L = 10; E = 200*(10^9); I = 363.76 * (10^-8); K = 3000; F = ((41*q*(L^4))/384)/(((E*I)/K)+(L^3/3)); ...

8 years ago | 1

Answered
How to input this equation into MATLAB
syms t y = (exp(t/20).*cos(3*t))./(t.^2+3) <</matlabcentral/answers/uploaded_files/130525/Screen%20Shot%202018-08-30...

8 years ago | 0

| accepted

Answered
Loop for plotting two columns again and again in a 205x10 cell arrray
clear all Datas = load('194tp.mat') x1 =Datas.c(:,1) y1 = Datas.c(:,2) ...

8 years ago | 1

| accepted

Answered
Why do I get "Array indices must be positive integers or logical values"?
Yes because index has to be positive where your loop starts from 1 if you index x as *i-1* it means it’s zero that’s why the err...

8 years ago | 1

| accepted

Answered
Run Section button greyed out
The root of the problem was auxiliary functions defined within the main script. Since these functions were located in one of the...

8 years ago | 3

| accepted

Answered
How to extract uncertainty from experimental data using MATLAB.?
I'm not really sure what datas you want but: A = load('A.mat') A.A(:,1) % this would give you the first column likew...

8 years ago | 0

| accepted

Answered
generating audio file through m.script
*Try the below code:* recorder = audiorecorder; disp('Start speaking.') recorder.record(100); %100 refers to the seco...

8 years ago | 0

| accepted

Answered
how to build an if statement beyond the conditions
Q = [0.2; 0.8; 1.4; 1.1; 2; 3; 3.9; 4.2; 5.5; 5; 4.7; 4; 3.5; 3.8; 3.1; 2.5; 1.9; 1.3; 0.7; 0] K= zeros(20,1); ...

8 years ago | 0

| accepted

Answered
How can I solve 2 non linear equations in 3 unknowns ?
*Try this:* syms x y z %edited step 1 from 0 to 360 eqn1= 2.987*cosd(x)+18 == 18*cosd(y)-3.5*cosd(z) eqn2...

8 years ago | 0

| accepted

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

8 years ago

Answered
Is the license of matlab different with the matlab mobile?
No it needs the same licence just login with the same mathwork account. Mine works with the same account. *Read the below li...

8 years ago | 0

Answered
Index exceeds matrix dimensions
k1 = 30 x2= [1:100]' p1 = linspace(0,10,100); %100 elements p2 = linspace(0,1,100); %100 elements P=p1...

8 years ago | 1

| accepted

Answered
What is missing from MATLAB?
Is it possible to have the answer in latex form by default in command window? *The equations would be much more readable and ...

8 years ago | 0

Answered
i need to solve this equation
syms x eqn = 81^7-(x/27)^(2*x)==0 x = vpasolve(eqn,x)

8 years ago | 0

| accepted

Answered
What is the difference between rand and randi when using it in a 3D array
*Maybe try this:* array(randi([1 length(array)],1))

8 years ago | 4

Answered
i want to plot this physics problem ... but after run programme ..give me error in plot,, but i cant determine where the exact error
syms x E A B K T v n=1*10^19; area=1*10^-3; A=2; w=1*10^-4; q=1.6*10^-19; h=6.6*10^-34; ...

8 years ago | 0

| accepted

Load more