Answered
Read a Special Text File
r=readmatrix('file.txt');%see if this will work

4 years ago | 0

Answered
How do I multiply different sized vectors together?
e = 0.5:0.01:1; h = [300 500]; a = [10 20 30]; [E,H,theta]=meshgrid(e,h,a);%all combinations into the same sized matrices d ...

4 years ago | 0

Answered
How to increase value of some matrix numbers
M= [12,16,3,5,1,11,13,22]; M(M<9)=M(M<9)+1;

4 years ago | 0

Answered
Group making from large data size
a=rand(100,3); b=zeros(10,3,10); for k=1:10 b(:,:,k)=a(10*(k-1)+1:10*k,:);%10 groups end %not sure what you want for me...

4 years ago | 0

Answered
How can I operate with a for loop on a two-dimensional matrix?
x_T=0.3;y_T=0.3; mae=sum(hypot(x-x_T,y-y_T),2);

4 years ago | 0

Solved


RandomProblem13-Cube a number
Cube a number

4 years ago

Solved


Random Problem12- Squaring a number
Square the number

4 years ago

Answered
Index exceeds the number of array elements. Index must not exceed 1.
What is i? delta2_new = sqrt( ((d2(i-1)^2) + (2*v*(beta*gamma)/u0(i))*(delta_x)) / (1 + (2*(2 + (alpha/beta))) * ((u0(i) - u0(i...

4 years ago | 0

Answered
Averaging columns in table using only rows where a condition is met.
n_idx=hour(hobo_times.OOBS23)>=20 | hour(hobo_times.OOBS23)<=6; m=mean([tu_values_23'(n_idx);tu_values_27'(n_idx);tu_values_29'...

4 years ago | 0

| accepted

Solved


time of day
Calculate the time of day in days, hours, minutes or seconds passed since the beginning of the day, depending on the unit. The u...

4 years ago

Solved


RandomProblem33
Solve for the answer.

4 years ago

Solved


RandomProblem32
Solve for the answer

4 years ago

Solved


Multiply by 3
Multipy the thingy by 3

4 years ago

Answered
Find and replace a specific value in a table
m=table2array(yourTable);%assuming your table is all numbers of the same type m(m==-9999)=nan; %then just plot from the matrix...

4 years ago | 1

Answered
Help using solve function
fun=@(em) (em-eh)/(em+gamma*eh)-sum(fc.*((ec-eh)./ec+gamma*eh)); guess=5;%what is your best guess for what ema should be? ema=...

4 years ago | 0

Answered
I am trying to loop my if statement but I'm not sure how to
xlsx = 'xlsx'; while true file = input("Enter file name including file extension: \n",'s'); if contains(file, xlsx) ...

4 years ago | 1

| accepted

Solved


Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

4 years ago

Solved


Palindrome Problem 1
Continued Problem 50033: A palindrome is one-thirteenth of the sum of and , where and are also palindrome. Give an example o...

4 years ago

Solved


Long-digit Subtraction
Suppose you need to subtract a very large integer from another integer. <http://www.mathworks.com/matlabcentral/cody/problems/56...

4 years ago

Solved


Cycling — Critical Power
From Training and Racing with a Power Meter by Allen and Coggan: "A number of equations have been presented in the scientific...

4 years ago

Solved


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

4 years ago

Answered
Sum cumulative value from all files that is summoned in a loop
datafolder = ' Z:\Projects\data'; file = dir(datafolder); row_length = 0; for i = 3:105 patient = load(strcat(datafolde...

4 years ago | 0

Solved


Narcissistic problem
How many likes has this problem?

4 years ago

Solved


Square Rooting a Number
This MATLAB Cody exercise requires you to take a number x, square root it, and get y

4 years ago

Answered
How to put array in a cell of different groups ?
A = [ 70; 63; 105; 95; 128; 123; 137; 132; 142; 143; 154; 154; 160; 143 ]; for k=1:length(A)/2 B{k}=A(2*(k-1)+1:2*k); en...

4 years ago | 0

Solved


Project Euler: Problem 14 Longest Collatz sequence
This problem is a hard version of "Problem 42673. Longest Collatz Sequence", because of time limits. <https://ww2.mathworks.cn/...

4 years ago

Answered
How to solve an equation with two variables?
m=.1:.01:1; for k=1:length(m) eqn=@(n) sqrt(m(k)*n)./(m(k) + 1 - 0.778*m(k)*n)-.707; n(k)=fzero(eqn,5); end

4 years ago | 0

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

4 years ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

4 years ago

Solved


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

4 years ago

Load more