回答済み
Need help with an if loop
First, exp(x) has an expansion as follows: Now, how to define infinity? When , . So, we check if ...

4年以上 前 | 0

回答済み
Replace specific line in a text file
One of the way could be: fid = fopen('data.dat','r'); % Open File to read replaceline = 'act= 1,0,8,-2'; % Line to...

4年以上 前 | 1

| 採用済み

回答済み
compare between element of matrix in different size
To check if there is any common element between 2 vectors, you may consider using 'intersect()'. So, your if condition becomes: ...

4年以上 前 | 0

回答済み
problem in 3d figure plotting
one of the several ways could be: fill3(X,Y,Z,'b') I hope it helps !

4年以上 前 | 0

| 採用済み

回答済み
Plotting 3D Intersection
I am not sure how you actually want to plot these values. But one of the way I could think of plotting this data is by using B3:...

4年以上 前 | 0

| 採用済み

回答済み
how to over come vector mismatch error in plot
You can try : tp=2.2676*10^-3; Ts=22.6757*10^-6; n=0:Ts:100; fp=(1/tp); w=2*pi*fp; p=sin(w*n*Ts); p(find(p<0))=0; data =...

4年以上 前 | 0

回答済み
how do i print the 10 figures seprately ?
Try: clear;clc M = rand(1000,10); M = cos(2*pi*M); for c = 1:size(M,2) figure(c) hist(M(:,c)) title(num2str(...

4年以上 前 | 0

回答済み
How do you graph a function that refers to the function in its value?
MATLAB doesn't allow 0 as an index. Infact, index must be a natural number. y(0) % is an invalid index because 0 y(0.5) % is ...

4年以上 前 | 0

回答済み
How to turn scatterplot labels on and off using uicontrol
Try the following method (it might work for you but there are some limitations) : x = rand(1,100); y = rand(1,100); pointsize =...

4年以上 前 | 0

回答済み
Why is matlab giving me a a very small number when the answer should be EXACTLY zero?
It must be something to do with the limitation of matrix multiplication and the computing error comes with the this type of mult...

4年以上 前 | 2

回答済み
Create a new array on the basis of another array
Try: A = 100-V; A(A == max(A)) = 100;

4年以上 前 | 0

| 採用済み

回答済み
how to delete cell rows ?
One of the way to do: cell_sizes = cellfun(@size,QDSCD,'UniformOutput',false); cell_sizes = vertcat(cell_sizes{:}); ind = fi...

4年以上 前 | 0

| 採用済み

回答済み
wirte in excel sheet.
So, in order to change row as you change the q, you have to change the range dynamically. row_num = 1; % you can change that u...

4年以上 前 | 0

回答済み
Changing the For LOOP conditions
One of the way to do this is define the for loop conditions using predefined vectors. You can write vector to set how the for l...

4年以上 前 | 0

| 採用済み

回答済み
How to enter subscripts in matlab? for a loop
Simply shift your indeces by 1 i.e. x0 becomes x1, x1 becomes x2 and so on. N = 500; x = zeros(N+1,1); x0 = 1; x(0+1) = x0;...

4年以上 前 | 0

解決済み


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

4年以上 前

解決済み


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

4年以上 前

解決済み


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

4年以上 前

解決済み


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

4年以上 前

解決済み


05 - Vector Equations 3
Define the vector _dVec_: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 10) ...

4年以上 前

解決済み


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

4年以上 前

解決済み


07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

4年以上 前

解決済み


Box!
Given a box, find the volume of the cube. With each side = a.

4年以上 前

解決済み


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

4年以上 前

解決済み


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

4年以上 前

回答済み
Array indices must be positive integers or logical values.
y(0) = 1; % y(i) = k; i must be a natural number Not allowed in MATLAB. Instead write y(1) = 1;

4年以上 前 | 0

| 採用済み

回答済み
Why does my function keep returning zero?
Replace K1 = A1*exp(-(E1/R*T)); by K1 = A1*exp(-(E1/(R*T))); ans subsequently for K2 & K3 too.

4年以上 前 | 0

| 採用済み

回答済み
How to find acceleration from velocity and time data ?
Assuming you have exported velocity data from the csv file using xlsread or something and saved it in a variable, say, 'vel'. To...

4年以上 前 | 2

回答済み
How can I write data to excel without overwrite data that already in the excel ?
To write in the empty rows, you have to specify that to xlswrite. So, either you know the row number beforehand and use that 'xl...

4年以上 前 | 1

| 採用済み

回答済み
What's wrong with my for loop?
You don't need final 2 lines inside the 'for' loop to update 't'. t is automatically updated because of 'for' loop statement. ...

4年以上 前 | 0

さらに読み込む