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...

etwa 4 Stunden 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...

etwa 5 Stunden 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);

etwa 6 Stunden 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...

etwa 6 Stunden 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(...

etwa 6 Stunden 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".

etwa 13 Stunden 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...

etwa 13 Stunden ago

Answered

Deleting columns corresponding to time value

data=data(:,data(1,:)>3);

Deleting columns corresponding to time value

data=data(:,data(1,:)>3);

etwa 14 Stunden ago | 0

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

ein Tag 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...

2 Tage ago | 1 download |

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...

2 Tage 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...

2 Tage 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...

2 Tage 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);

2 Tage 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...

2 Tage 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...

3 Tage 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)];

3 Tage 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...

3 Tage 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)*...

4 Tage 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...

4 Tage 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 ...

7 Tage 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 Tage 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 Tage 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 Tage 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 Tage 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 Tage ago | 0

| accepted

Answered

How to categorize a range

function BMIdetermination() a=input("Enter your height in cm: "); b=input("Enter your weight in g: "); Gender=input("Enter nu...

How to categorize a range

function BMIdetermination() a=input("Enter your height in cm: "); b=input("Enter your weight in g: "); Gender=input("Enter nu...

10 Tage ago | 0

| accepted

Answered

how can i put multiple matrices into a struct?

A and B are maxtrixes of any size. m=struct('matrix',{A,B}); struct field is 'matrix', so m(1).matrix == A and m(2).matrix == ...

how can i put multiple matrices into a struct?

A and B are maxtrixes of any size. m=struct('matrix',{A,B}); struct field is 'matrix', so m(1).matrix == A and m(2).matrix == ...

10 Tage ago | 0

| accepted

Answered

Summing values from a loop

function [P,S,He,Hy,RegList]= f() condition = true; count=1; while condition regNum = input('Enter balloon registration ...

Summing values from a loop

function [P,S,He,Hy,RegList]= f() condition = true; count=1; while condition regNum = input('Enter balloon registration ...

10 Tage ago | 0

| accepted