Error while performing integration
Or don't even have a Zdirection function x=1:0.1:5; a=5; alpha=30*pi/180; beta=120*pi/180; Z=3; for i=1:length(x) z(i)...

12 días ago | 0

While Loop, with a user made function
You will need to figure out how you want to compare the maxtrices, less than (<) compares element-to-element producing a logical...

14 días ago | 0

How do I add to a cell array based on logicals?
There might be an easier way. Here is one with a single loop. b=num2str(B); b=b(b~=' '); [idx1,idx2]=regexp(b,'[0]+'); for k...

14 días ago | 0

| accepted

How to delete every "n thru m" rows?
I might not understand your question fully. What is the size of your matrix? (260x1) yourMatrix(151:181,:)=[];%deletes rows in ...

14 días ago | 0

Solved

find side of shape

14 días ago

Solved

let y be the inverse of x

14 días ago

Solved

create a matrix [x,y]

14 días ago

Morse Code Decoder help!
Look at what this does. word='Name'; word=upper(word); morseWord=morse(word-'@');

14 días ago | 0

write cell array of tables to a .txt file
out=[] for k=1:length(yourCell) out=[out,strjoin(yourCell{k}.Var1,'\t')]; end

14 días ago | 0

| accepted

Repeat matrix columns in pairs.
out=[repmat(A(:,1:2),1,2),repmat(A(:,3:4),1,2)];

14 días ago | 0

| accepted

How to find and print elements of a character array?
Use a cell array instead. mem={'ISNT-60','ISA55-55-6 b/b','ISMC-100 b/b','ISMC-125 b/b','ISMB-225','ISMC-175 b/b','ISHB-250','I...

14 días ago | 1

| accepted

Unable to update while loop condition
Not sure what your question is then. The following works just fine for me. while max(abs(Oij_k1-Oij_k))>tol && (k<Klim)

15 días ago | 0

Problems replacing for-loops
There is nothing wrong with for-loops. The only thing you can vectorize is T T=0:tmax; for t=1:1:tmax S(t+1)=S(t)+(a-d*S(...

15 días ago | 0

| accepted

Unable to update while loop condition
Oij_k1=[1 1];%need to define before using while max(abs(Oij_k1-Oij_k))>tol || (k<Klim)%I believe you want >tol

15 días ago | 0

Index exceeds matrix dimensions error
for j=1:M for i=1:N%changing to N-1 allows script to run q=(-K/2)*(A(i+1,j)-A(i,j)/dr);%A is 105x101 and N=105...

15 días ago | 1

| accepted

scatter plot (need matlab script)
x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.9677, 36.9816, 35.13...

15 días ago | 1

Specific Row/Column addition and subtraction in a N by M matrix
abs(sum(m(2,1:3))+sum(m(3:5,4))-sum(m(3,1:3))-sum(m(4:5,3)));

15 días ago | 0

Forming a series equation
y=1:100; x=100-10/3*y(2:end);

15 días ago | 0

| accepted

d=3.6e-6;r=.15; n=1:1e6;%not quite infinate eqn=@(t)24/pi^2*sum((1./(n-.5).^2).*exp(-(n-.5).^2*pi^2*d*t/r^2))-12.5; T=fzero(e...

15 días ago | 0

| accepted

How can I select numbers from excel to matlab?

16 días ago | 0

Solved

Number Puzzle - 118

16 días ago

Solved

Number Puzzle - 119

16 días ago

How to fix the range of a variable?
Not clear what the question is, but if you just want to randomly sectect 24 digits from 0-3, then: x=randi(4,1,24)-1;

16 días ago | 0

How to plot the Free particle wave function
a=10; c1=pi*sqrt(2*a); h=(6.626/(2*pi))*10^-34; m=9.11*10^-31; X=-60:.1:60; t=m*a^2/h; V=zeros(1,201); for j=1:length(X) ...

16 días ago | 0

| accepted

Use Position Values to Keep Values in Matrix
Filled=Filling.*(cumsum(Volume<0,2)==1);

16 días ago | 0

| accepted

How to find vector elements indices for the first and last locations of a specific number?
[~,idxfirst]=ismember(unique(A),A); [~,idxlast]=ismember(unique(A),flip(A)); idxlast=length(A)+1-idxlast;

16 días ago | 1

| accepted

How to fitt a power function to data
If you have the curve fitting toolbox. f=fit(x,y,'power1');

16 días ago | 0

Return the value from a specific excel colomn/row
If you don't provide an example, we don't know what the format of lat/long/temp is in. They might be numbers or strings. a=read...

16 días ago | 0