Answered

Multiplication in cell arrays

Or a simple loop. for i=1:408 PRECTOTCORR{i}=PRECTOTCORR{i}*result(i); end

Multiplication in cell arrays

Or a simple loop. for i=1:408 PRECTOTCORR{i}=PRECTOTCORR{i}*result(i); end

circa 3 ore ago | 0

Answered

Reading string within a string

b={sprintf('problem.%s',a),sprintf('problem1.%s',a)};

Reading string within a string

b={sprintf('problem.%s',a),sprintf('problem1.%s',a)};

circa 3 ore ago | 1

| accepted

Answered

Array indices must be positive integers or logical values.ERROR

throuput1=(c*(B*log(1+SNIR)));%I think you left out a * (c*...) otherwise you are trying to index into c Also, log(0) will be ...

Array indices must be positive integers or logical values.ERROR

throuput1=(c*(B*log(1+SNIR)));%I think you left out a * (c*...) otherwise you are trying to index into c Also, log(0) will be ...

circa 3 ore ago | 0

Answered

How to store Values in a Loop?

for t=0:10 L = 3*cos(t); M = diag([L 5*cos(t) 7*cos(t)]); K = [12e5*cos(t) 18e5*cos(t) 34e5*cos(t);18e5*cos(t) 15...

How to store Values in a Loop?

for t=0:10 L = 3*cos(t); M = diag([L 5*cos(t) 7*cos(t)]); K = [12e5*cos(t) 18e5*cos(t) 34e5*cos(t);18e5*cos(t) 15...

circa 23 ore ago | 0

| accepted

Answered

Plotting a temperature Depth Profile

A = readmatrix('name.xls');%I will assume temperature is in the first column and depth in the second column B = readmatrix('nam...

Plotting a temperature Depth Profile

A = readmatrix('name.xls');%I will assume temperature is in the first column and depth in the second column B = readmatrix('nam...

1 giorno ago | 0

Answered

I am trying to plot a function with iteration of a variable

Not sure what t is, but you do not need a for-loop. r = 0:.01:a; Vc = ((r.^2 - (a-d)^2)/(4*viscosity_c))*dpdz1; plot(Vc,r);

I am trying to plot a function with iteration of a variable

Not sure what t is, but you do not need a for-loop. r = 0:.01:a; Vc = ((r.^2 - (a-d)^2)/(4*viscosity_c))*dpdz1; plot(Vc,r);

1 giorno ago | 0

Answered

How to store an x-y coordinate under one Variable

I really don't understand. How are your data points stored? Why is it easier with a single vector rather than two? You can alway...

How to store an x-y coordinate under one Variable

I really don't understand. How are your data points stored? Why is it easier with a single vector rather than two? You can alway...

1 giorno ago | 0

| accepted

Answered

How can I plot scatter graphs in a for loop?

Assume you have your data in a matrix, M. Assume you want a scatter plot of the column vs. mean of each column. scatter(1:size(...

How can I plot scatter graphs in a for loop?

Assume you have your data in a matrix, M. Assume you want a scatter plot of the column vs. mean of each column. scatter(1:size(...

1 giorno ago | 0

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

1 giorno ago

Solved

BASICS - sum part of vector

Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

1 giorno ago

Answered

Caesar's cypher Encryption

function coded=caeser(v,a) coded=char(mod(v-32+a,95)+32); end

Caesar's cypher Encryption

function coded=caeser(v,a) coded=char(mod(v-32+a,95)+32); end

2 giorni ago | 0

Submitted

Curve448 Shared-Key Generation GUI

Elliptic Curve Cryptography using curve-448. Generates private-key times a given x-coordinate point (input) the is on the ellipt...

3 giorni ago | 2 downloads |

Solved

Elliptic Curve Cryptography (ECC) Point Addition

Given two points (P and Q, they can be the same points on the elliptic curve), compute ECC point addition on a Weierstrass ellip...

3 giorni ago

Problem

Elliptic Curve Cryptography (ECC) Point Addition

Given two points (P and Q, they can be the same points on the elliptic curve), compute ECC point addition on a Weierstrass ellip...

3 giorni ago | 1

Answered

vector to upper and lower triangular matrix

Not sure what elements you want above and below the diagonal. a=repmat(A,[length(A),1]).*~diag(ones(1,length(A)))+mean(A)*eye(l...

vector to upper and lower triangular matrix

Not sure what elements you want above and below the diagonal. a=repmat(A,[length(A),1]).*~diag(ones(1,length(A)))+mean(A)*eye(l...

3 giorni ago | 0

Answered

Assume the user inputs an array names "A", write code that computes, and saves the number of rows and columns in "A"

[cols,rows]=size(A);

Assume the user inputs an array names "A", write code that computes, and saves the number of rows and columns in "A"

[cols,rows]=size(A);

3 giorni ago | 0

Submitted

Curve25519 Shared-Key Generation GUI

Elliptic Curve Cryptography using curve-25519. Generates private-key times a given x-coordinate point (input) the is on the elli...

3 giorni ago | 2 downloads |

Answered

Creating Random Vector with Set intervals

How long do you want the vectors to be? Why not make a matrix where each row has the vectors? M=zeros(10); for i=1:10 M(i...

Creating Random Vector with Set intervals

How long do you want the vectors to be? Why not make a matrix where each row has the vectors? M=zeros(10); for i=1:10 M(i...

4 giorni ago | 1

Answered

Addition to specified elements in a vector with for loop to create a new vector

xx=[x(1:3);x(1:3)+2.5]; xx=[xx(:)',x(4:end)];

Addition to specified elements in a vector with for loop to create a new vector

xx=[x(1:3);x(1:3)+2.5]; xx=[xx(:)',x(4:end)];

4 giorni ago | 0

| accepted

Answered

Creating a For loop for a Harmonic Series

last is not an array; therefore last(i) does not work! function x = HarmArray(last) x=zeros(1,last); for i=1:last x(i)=1...

Creating a For loop for a Harmonic Series

last is not an array; therefore last(i) does not work! function x = HarmArray(last) x=zeros(1,last); for i=1:last x(i)=1...

4 giorni ago | 0

Answered

How many laps a runner can make for 45 minutes with increasing 10% of running time in each lap

function laps=runTrack(t,dt,rt) %first lap time: t %total run time: rt %percent increase in each lap: dt M=cumsum(t*((1+dt)*...

How many laps a runner can make for 45 minutes with increasing 10% of running time in each lap

function laps=runTrack(t,dt,rt) %first lap time: t %total run time: rt %percent increase in each lap: dt M=cumsum(t*((1+dt)*...

5 giorni ago | 0

| accepted

Answered

Calculating the sum of A elements which are numbers between 30 and 65

You had it! A=randi([10,100],8,20); B=0; for i=1:8 for j=1:20 if A(i,j)>30 && A(i,j)<65 B=B+A(i...

Calculating the sum of A elements which are numbers between 30 and 65

You had it! A=randi([10,100],8,20); B=0; for i=1:8 for j=1:20 if A(i,j)>30 && A(i,j)<65 B=B+A(i...

5 giorni ago | 1

| accepted

Answered

matrix dimensions must agree

Length of x and y must be equal since they are points. The following functions evaluations lagrange polynomial at each value of ...

matrix dimensions must agree

Length of x and y must be equal since they are points. The following functions evaluations lagrange polynomial at each value of ...

8 giorni ago | 0

Answered

If statement multiple condition overposing

No need for a loop. Noncompliance=sum(LeftFrontLegX<=0 & RightFrontLegX>=0);

If statement multiple condition overposing

No need for a loop. Noncompliance=sum(LeftFrontLegX<=0 & RightFrontLegX>=0);

8 giorni ago | 0

Answered

Index in position 1 exceeds array bounds

If imfindcircles finds less than 5 circles you are going to error. A = imread('circle.png'); imshow(A); [centers, radii, metr...

Index in position 1 exceeds array bounds

If imfindcircles finds less than 5 circles you are going to error. A = imread('circle.png'); imshow(A); [centers, radii, metr...

8 giorni ago | 1

| accepted

Answered

Extract number from file name

Look at regexp function. I assume your input is a string array and you want a string array output. a='K_5_6.5.json'; b=regexp(...

Extract number from file name

Look at regexp function. I assume your input is a string array and you want a string array output. a='K_5_6.5.json'; b=regexp(...

8 giorni ago | 1

| accepted

Answered

How to wirte the matrix G

n=whatever size matrix you want. G=eye(n)+diag(ones(1,n-1),-1)+diag(ones(1,n-2),-2);

How to wirte the matrix G

n=whatever size matrix you want. G=eye(n)+diag(ones(1,n-1),-1)+diag(ones(1,n-2),-2);

10 giorni ago | 1

Answered

Transform a set of "if" arguments into a unified "for" function

if n_dice==1 Z=randi(6,1,n_trials); else Z=sum(randi(6,n_dice,n_trials)); end

Transform a set of "if" arguments into a unified "for" function

if n_dice==1 Z=randi(6,1,n_trials); else Z=sum(randi(6,n_dice,n_trials)); end

10 giorni ago | 0

| accepted