Question

How to make this code more efficient?

I am new to MATLAB hence my poor use of it as you can see in this piece of code. I think a for loop would be handy here, so any ...

7 months ago | 0 answers | 0

Question

How to add an extra for loop

I have a time series data which is 46723-by -1. I want to populate another matrix with some specific time series. this is the co...

7 months ago | 1 answer | 0

Question

How do I add color to this line of code without repeating the time variable everytime?

plot(time,[accLong,accVert,accLat,],'linewidth',2) % plot all I do not want to use this version plot(time,accLong,'r',time,...

7 months ago | 1 answer | 0

Question

Optimization problem: matlab inbuilt function "getIpOptions" generates an error in fmincon

This code is used to generated the minimum quantities of two good given a cost constraints. it is a simple optimization problem ...

11 months ago | 1 answer | 0

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

1 year ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

1 year ago

Question

another way to break without using the command 'break'

Hi all, In this code i want to know another way to break the code withoug using the 'break command': This break should happen w...

1 year ago | 2 answers | 0

Answered

I have a problem. It can not run. Help me please.

you should use the elementwise operation e.g [.* and .^]. like this below T1 = (T0)+((A .* P ./(2.*pi.*k.*(((x1).^2 + y.^2).^0....

I have a problem. It can not run. Help me please.

you should use the elementwise operation e.g [.* and .^]. like this below T1 = (T0)+((A .* P ./(2.*pi.*k.*(((x1).^2 + y.^2).^0....

1 year ago | 0

Question

How to fill array of zeros with string

Hello, I have the following code in which i want to fill the preallocated x with strings instead of number, i reason like this ...

1 year ago | 1 answer | 0

Answered

How do i find only the specific date of the maximum temperature?

maxim = find(CVG.TMAX == max(CVG.TMAX)); % CVG is the name of the data, TMAX is the column of the maximum temp CVG(maxim,2:10)...

How do i find only the specific date of the maximum temperature?

maxim = find(CVG.TMAX == max(CVG.TMAX)); % CVG is the name of the data, TMAX is the column of the maximum temp CVG(maxim,2:10)...

1 year ago | 0

| accepted

Question

How do i find only the specific date of the maximum temperature?

Hello, I have the the data below in which i already the know Maximum the maximum temperature in the TMAX column to be 44.96 by...

1 year ago | 2 answers | 0

Question

how to create a vector with if-else statement

Hello, I have the table below and the only problem is for the highlighted column. ! want it to show me either (over-damped or u...

1 year ago | 1 answer | 0

Question

find if two numbers are BOTH present in an array

Hello everybody, Given 2 numbers p and q and a vector v, the question is, are BOTH elements in v? by defining a function wit...

2 years ago | 1 answer | 0