Solved


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

4 years ago

Solved


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

4 years ago

Solved


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

4 years ago

Solved


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

4 years ago

Solved


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

4 years ago

Answered
How to generate a signal with logarithmic increasing amplitude and a constant frequency?
t=0:0.001:1; f=60; y=log(t+1).*sin(2*pi*f*t); plot(t,y)

4 years ago | 0

| accepted

Answered
Calculate min/max/mean value every 100 points
Just remove the last 99 elements. If you need the mean, max, min for the last 99 elements, calculate them separately. r=reshape...

4 years ago | 0

Answered
A few questions of passing to functions, recursion and plotting
I=0:0.01:(Iph+Is+.01);%I cannot be >Iph+Is (based on log not going negative U=(A*k*T*log((Iph+Is-I)/Is)-I*Rs*q)/q;%easy enough ...

4 years ago | 0

Answered
Sum row 2 and stop when 1 is reached in row 1
m= [0,0,1,0,0,0,1,0,0,1;0.0220,0.3110,0.0230,1.0550,0.0230,0.0456,0.1120,0.0400,0.0660,0.3690]; %rows of the same matrix must ...

4 years ago | 1

Answered
How to take mean of many large matrices?
s=zeros(720,600); n=0; for j = 1:19 year = 2001 + j r = readmatrix(sprintf('td%d', year)); s=s+sum(r,3); n...

4 years ago | 1

| accepted

Answered
for loops and arrays
m=[30 45 30 45 30 45 30 45 30 45 30 45 30 45 30 45 30 45 30 45 3...

4 years ago | 0

Answered
Combining a number and a string array (both columns) into a single column string array.
s=string(strcat(STRR,num2str(NUMM)));

4 years ago | 0

Answered
How to index equally spaced chunks from a long signal?
ms5=1000;%approximate number of data samples after the pulse to start averaging on (should be based on your sample frequency) m...

4 years ago | 0

Answered
Rewrite the script without using continue and break statement.
Not sure what you are trying to do, but the final b is going to be zero. a=5:-1:-2; b=0; disp('b<41'); disp('b<41'); disp('...

4 years ago | 0

Answered
Playing 3 different audio samples using 3 different buttons on GUI?
You need to pass player1, player2, and player3 to your functions. One way is to make the functions part of an overall function. ...

4 years ago | 1

Answered
Summation In Matlab With Vectors
No loop needed. Need to examine each array (s11,Yd,smat) and ensure they have the necessary elements (at least N). Recommend not...

4 years ago | 0

Answered
description to solve equation involved integration
I am somewhat guessing this is what you want. Execution might take a few minutes. Reduce the delta array for faster execution. ...

4 years ago | 0

| accepted

Answered
How do I plot this graph?
Cf= [0.0040,0.0028,0.0014]; Pi= [0.5,1.5,4]; K=0.41; x = linspace(10,1000); g =(sqrt(2./Cf)/10000)'.*x; Re_d=1.0.*10.^4; w...

4 years ago | 0

| accepted

Answered
if-else statement for 4 comparison
A= [0;1;0;1;1;0;1]; B= [0;1;1;0;1;1;0]; output=cell(size(A)); output(A==1&B==1)={'TP'}; output(A==1&B==0)={'FN'}; output(A=...

4 years ago | 0

Answered
Trouble getting code to output properly
datenum('6/21/2011')-datenum('1/1/780')+1

4 years ago | 0

Answered
Matrix value multiplication error
Use the code box! n=[1,3,16]; P=[300 400 500 700 1000]';%transpose t=4; y=P.*(1+t/100).^n-P;

4 years ago | 0

| accepted

Answered
Why am I getting Index in position 1 is invalid. Array indices must be positive integers or logical values.
syms t; Fs = 1.5; % Sampling frequency T = 1/Fs; % Sampling period L = 150...

4 years ago | 0

Answered
sum logical 1's independently for each column
No loop is needed. r=readmatrix('logicalDataCount.xlsx'); s=sum(r); l=s==size(r,1);

4 years ago | 0

Submitted


Psychomotor Vigilance Task (PVT)
The psychomotor vigilance task (PVT) is a sustained-attention, reaction-timed task.

4 years ago | 4 downloads |

0.0 / 5
Thumbnail

Answered
I can solve this problem by those code but how can i solve this problem by using loop?
Don't understand your question. You are using a loop. l=[45 55 50]; while 1 mukim = input('Please select mukim (A = Pulai,...

4 years ago | 0

Answered
Looking for Matlab code to implement the Pscyhomotor Vigilance Task (PVT)
I coded this quickly. Here is a back bone for the PVT. Modify as desired. function [sleepAttack,lapse,good,tooFast,excessiveCli...

4 years ago | 0

Answered
How to use a filename character array as a name of a variable?
Just use a loop. newResults=[]; for k=1:100 r=load(strcat('whatever_',num2str(k))); newResults=[newResults;r.Results];...

4 years ago | 0

| accepted

Answered
ploting or showing a 41*41*50 matrixt
if it is in a grid [x,y]=meshgrid(1:41); surf(x,y,satur(:,:,1));%shows the first one

4 years ago | 0

| accepted

Answered
Elementwise addition operation in matrix or array
If you are just adding a scalar to column 2 of BD BD(:,2)=BD(:,2) + Scalar;

4 years ago | 1

Answered
Why is my Muller Methods program fail?
Not sure if you are doing divided differences correctly. x=[1.3 1.5 2];%input x values p=[1 -1 2 -2];%input polynomial y=poly...

4 years ago | 0

| accepted

Load more