Community Profile

# David Hill

##### Last seen: Today
1.023 total contributions since 2017

View all

Contributions in
View by

How to convert each row in a cell array to a (1*n ) double matrix?
a=cell(1,164); for j=1:164 a{j}=[Key{j,1:end}]-48; end

10 dagen ago | 3

| accepted

Error: Inner Matrix Dimension Must Agree
Vd = 0:0.1:0.7; P = ((0.6*Vd)-((Vd*1.5*10^-12).*(exp(38.64*Vd)-1)));%just need a dot (.*) plot(Vd,P)

11 dagen ago | 1

| accepted

How to save figures to pdf or doc document?
https://www.mathworks.com/matlabcentral/fileexchange/71053-figure2pdf

11 dagen ago | 0

If you have built the data correctly, you access the function by: mld = ra_mld(salt,temp,Z);%dT defaults to 1 Function should ...

11 dagen ago | 0

Determine the number of y-values less than the number 2.0
y = 2.5 + randn(100,1); a=mean(y); fprintf('the average of this list is %f\n', a); t=nnz(y<2); fprintf('The number of values...

11 dagen ago | 0

Error: The logical indices contain a true value outside of the array bounds.
function Tgem2 = MaandGem2019(maand19) load data_weer.mat; Tgem2=mean(TG(jaar==2019&maand==maand19)); end

11 dagen ago | 0

| accepted

How to write a function for a certain number of random numbers
function out=randint(N) out=randi(19999,1,N)-10000; end

12 dagen ago | 1

Generate an array within three loops
count=1; for n=.1:.1:.5 for m=.1:.1:.5 for k=1:5 c(count)=94*2.4^n*.4^m;%1^k is always 1, so it does...

12 dagen ago | 0

Error:" Output argument "y" (and maybe others) not assigned during call to"
y might never get assigned in your function. What do you want y to be if it doesn't meet any of your conditional statements? Jus...

13 dagen ago | 1

Box-cox transformation isn't working!?
My understanding is that the boxcox() transformation changes the data into an approximately normal distribution. And the kstest(...

13 dagen ago | 0

How to get row index which have my text
I assume you loaded your text into a cell. a={'Hi Helo';'How are you mekala';'what are you doing';'where are you going mekala'}...

13 dagen ago | 0

how to extract a column from table ?
Not sure why you need a table, but convert to matrix, then: [~,idx]=max(sum(y));%idx will give you the column number of the max...

13 dagen ago | 0

| accepted

how is it possible to solve below matlab codes problem?
I was somewhat confused with your question. Hopefully, this helps: for i=1:8784 %one year (hours) if Ppv_N(i,1) > PLoad(...

13 dagen ago | 0

Problem with if and else and else
if 0.04<=t_1/Do&&t_1/Do<0.05 %need && t_1 = Pd*di/(2*k*Fy); Do = di + 2*t_1; ...

14 dagen ago | 0

| accepted

How do i display all the values of this for loop?
for b = 1:ne c = 0 + (b)*a%remove ; end or c=zeros(1,ne); for b = 1:ne c(b) = 0 + (b)*a%remove ; end display(c);...

14 dagen ago | 0

| accepted

convert binary to array matrix double
a=a-48;

14 dagen ago | 0

I want to perform a function on the values that are on the even positions of my vector
M(2:2:end)=-1*M(2:2:end);

16 dagen ago | 0

| accepted

I have a problem with plotting a summation equation, Help me!
k=6; f=zeros(1,2*k-7) for i=0:2*k-8 f(i+1)=sqrt((2*k-3)/((3+i)*(2*k-4-i))); end f=cumsum(f); f=f(1:2:end);%x=0,2,4 pl...

16 dagen ago | 0

a*x^2+b*x+c using "while"
sin and cos are always between -1 and 1. The equation can never equal 0, unless you really are leaving out some important parent...

17 dagen ago | 0

how to calculate the distance of a lat lon to the coastline?
Technically, you should use spherical trigonometry (great circle path) to determine the shortest distance. The algorithm is not ...

17 dagen ago | 0

How to write vector form of very large number?
You could always use java BigInteger if you don't have symbolic toolbox. import java.math.* x=BigInteger(99); x=x.pow(99); x...

17 dagen ago | 0

Convert .rpt to .m file?
https://www.mathworks.com/help/rptgen/ug/generating-matlab-code-from-report-templates.html

18 dagen ago | 0

I want to count the number of times each event (a, b, c... up until j) occurs, a(t<1 hour) b(1 hour<t<2 hours) c(2 hours<t<3 hours)... up to j( t>9 hours) based on the following sample in order to find the probability of any individual event occuring
If your data is not in a cell array, convert to a cell array. For example: A={'02:47:09';'03:28:26';'13:57:18';'08:58:46';'10:3...

18 dagen ago | 0

| accepted

How to separate each month of this file?
M=cell(1,12); cy=[0,31,59,90,120,151,181,212,243,273,304,334,365]*24; for k=2:13 M{k-1}=yourMatrix(cy(k-1)+1:c(k),:); en...

18 dagen ago | 1

| accepted

Heatmap with log scale axis
Look at: semilogx()

18 dagen ago | 0

How to get a script to only give me the number of elements less than 2?
nnz(y<2);

18 dagen ago | 0

| accepted

Programming Mathematics logarithm problem
n=1+log(s/E)/log(r/t);

18 dagen ago | 2

| accepted

Law of motion through numerical aproximation
F=@(t)6*sin(4*pi*t-pi/6)-0.5; t=0:.01:10; a=F(t)/.12; v=cumtrapz(a); d=cumtrapz(v); plot(t,d);

18 dagen ago | 0

Help me fix the code for binary to text translator
You need to decide what the format of your input binary will look like. Will you force the input to be multiples of 8-bits? If y...

18 dagen ago | 0

Submitted

Shake256
Uses Advance Encryption Standard algorithm from FIBS-197