Answered
how to use "randi" in specific case?
n=10;%length of matrix l=[10 15 20 25]; m=zeros(length(l),n); r1=randperm(length(l));r2=randperm(n,length(l));r3=randperm(len...

3 years ago | 0

Answered
How do I get the angle between three points input by ginput() in appdesigner?
z=[x,y]; d=diff(z); Angle=acos(dot(-d(1,:),d(2,:))/norm(d(1,:))/norm(d(2,:)));

3 years ago | 0

| accepted

Answered
how to change decimal point place
I am not sure how your numbers are stored. Are they stored as character arrays or doubles? a='3.261505126953125'; b=[a(1),',',...

3 years ago | 0

Answered
How to randomize points using a GUI
Please accept my previous answer if it was acceptable to you. GUI function GUI() f= figure; axes('Parent',f,'Position',...

3 years ago | 0

| accepted

Answered
How to fill the region formed by four lines?
beta11_um1 = @(delta11) 4.1797+0.396*delta11; beta11_lm1 = @(delta11) 0.4090+0.396*delta11; beta11_up1= @(delta11) 3.8058-0.4...

3 years ago | 2

| accepted

Answered
turning the loop answer into a vector
load data_matrix.mat data=SECTION_L; data(:,1:3)=[]; row=9; cleanup=data([1 2 3 row],:); c=1; for i = 1975:2016 for j...

3 years ago | 0

| accepted

Answered
Create a loop with condition
Does not seem like you need random values, but rather all values between -5 to 5 [x,y]=meshgrid(-5:.001:5);%generates all x0 pa...

3 years ago | 1

| accepted

Answered
I need my array to hit zero before starting next iteration
diff_counts=[20 40 60 80 100]; cases1=zeros(1,10080); starts1=sort(randi(10080,1000,1),'ascend'); for j=1:1000 cases1(star...

3 years ago | 0

Answered
Exact value of a result
residuez requires doubles as input, but p is just the roots of polynomial a which you could use symbolic to produce. a=sym([1, ...

3 years ago | 0

Answered
I need my array to hit zero before starting next iteration
Not sure if I completely understood your question, but break will break out of the for-loop. diff_counts=[20 40 60 80 100]; ca...

3 years ago | 0

Answered
how to calculate for a range of values for different initial conditions
beta=linspace(0,(pi/2),90); m=[1.25, 2, 6, 10]; [B,M]=meshgrid(beta,m); gamma= 1.4; theta=atan(2.*cot(B).*((M.*sin(B)).^2-1)...

3 years ago | 0

Answered
Help writing a function for a gui
Not sure what you want the randomize function to do. f= figure; axes('Parent',f,'Position',[0.05, 0.25, 0.9, 0.7]); x = 0.25;...

3 years ago | 0

| accepted

Answered
Help reduce number of rows by grouping continous data
d=find(diff(yourData)>1); m=[yourData(1),yourData(d(1))]; for k=2:length(d) m(k,:)=[yourData(d(k-1)+1),yourData(d(k))];%ge...

3 years ago | 0

| accepted

Answered
list all 9 integer between -3.5 and 5.5
unique(fix(-3.5:5.5))

3 years ago | 1

| accepted

Answered
How to access the double cell 5*1 ?
Your question is not clear to me. If you just want to access your cell array. load('vims.mat'); f{1}(2,3) %first cell, row 2 c...

3 years ago | 1

| accepted

Answered
How to compare multiple variables against one and produce an answer for each comparison?
ON=5;BC=2;QC=4;AB=1; L=["ON","BC","QC","AB"];%put names in string array r=[ON,BC,QC,AB];%put all variables into a single array...

3 years ago | 0

Answered
Read nth image from a folder and compare it with nth image from different folders and store the result
a=dir('F1/');b=dir('F2/');c=dir('F3/'); for k=1:length(a.name) i1=imread([a(k).folder,'/',a(k).name]); i2=imread([b(k...

3 years ago | 0

Solved


Digits of Powers of 2
In Project Euler Problem #16, we are asked for sum of the digits of powers of 2. Here we will be asked for more than that. Give...

3 years ago

Answered
How to assign sequence values to an specific column of a table?
size = [720 4]; Type = ["double","double","double","double"]; Names = ["Hours","PrEV","SoCEV","Gen"]; master = table('Size',s...

3 years ago | 0

Answered
Finding min and max values in a structure
d=struct2cell(yourStruct); m=0;M=0; for k=1:length(d) m=min([m,d{k}]); M=max([M,d{k}]); end

3 years ago | 0

Answered
Upload files with almost the same name in different components of a matrix
for k=1:1e4 s=sprintf('%08d.txt',k); spin(:,:,k)=load(['D:\Magnetic-Distribution\spins-',s]); end

3 years ago | 0

Answered
I need help randomizing the points of the traingle
figure;hold on; for k=1:10 p=polyshape(rand(3,1),rand(3,1)); plot(p) end

3 years ago | 0

Solved


Sum the unitary divisors of a number
Cody Problems 1933 and 46898 deal with , the sum of divisors function. This problem deals with , the sum of unitary divisors fun...

3 years ago

Solved


calculate the perimeter for a triangle with two equal sides
calculate the perimeter for a triangle with two equal sides where the equal sides are x and the other one is z

3 years ago

Solved


area of a triangle
area of a triangle, given x as a side

3 years ago

Solved


perimeter of a square

3 years ago

Solved


volume of a cone
create a program that allows us to calculate the volume of a cone using radius "r" and height "h"

3 years ago

Solved


perimeter of a trangle
g

3 years ago

Solved


elevate a number to its square
square

3 years ago

Solved


find the area of a triangle from its sides
pythagorean theorem

3 years ago

Load more