photo

Rahul Kalampattel


Con actividad desde 2013

Followers: 0   Following: 0

Programming Languages:
Python, C++, MATLAB
Spoken Languages:
English

Estadística

All
  • Quiz Master
  • Knowledgeable Level 3
  • Knowledgeable Level 2
  • First Answer
  • Scavenger Finisher
  • CUP Challenge Master
  • Speed Demon
  • Creator
  • Commenter
  • Solver

Ver insignias

Feeds

Ver por

Respondida
I am running a for loop for my program. however, I want to run the for loop until i have 10 non-zero values in the matrix A.
The simplest solution would be to change the |for| loop to a |while| loop. Just calculate |c| at each iteration, and once |c==10...

más de 7 años hace | 0

Respondida
how can i plot these dsp signals?
I think what you have is correct, except in the last command you should be plotting |q| rather than |S| and |x|. Also if you wan...

más de 7 años hace | 0

Respondida
How do i solve this problem?
The syntax for a user prompt is |prompt = 'text'| rather than what you had. prompt = 'Please enter number of strips: '; ...

más de 7 años hace | 0

| aceptada

Respondida
Matlab simple loop for different function variables (Finite Difference)
Something like this? Or did you want all the error terms in one 3D matrix? clc clearvars close all hVec = [0.0...

más de 7 años hace | 3

| aceptada

Respondida
How do I subtract from specific elements in a vector?
function [income cnt] = tickets( price, numTickets ) cnt = sum(numTickets); numTickets = numTickets - (numTickets>5)...

más de 7 años hace | 0

| aceptada

Respondida
Problem plotting Möbius strip
Use |meshgrid| to generate matrices for both your parameters, rather than using vectors. u = linspace(0,2*pi,100); v =...

más de 7 años hace | 2

| aceptada

Respondida
display surface normal using quiver3
*1.* Use [U,V,W] = surfnorm(X,Y,Z); instead of [U,V,W] = surfnorm(Z); This will make sure that the |quiver3| v...

más de 7 años hace | 0

| aceptada

Respondida
Does anyone know why not all of my streamlines complete themselves?
If you check out the <http://au.mathworks.com/help/matlab/ref/streamline.html documentation> for the |streamline| function, you'...

más de 7 años hace | 5

| aceptada

Respondida
Either quiver3 or streamline work for me, but not both, for the same test data
Does this look like what you're expecting? <</matlabcentral/answers/uploaded_files/71280/quiver.jpg>> Edited code: qp...

más de 7 años hace | 1

| aceptada

Respondida
How to plot a bode graph
Have a look at the documentation for |<http://au.mathworks.com/help/matlab/ref/semilogx.html semilogx>| and see if it helps...

más de 7 años hace | 0

Respondida
What's wrong in this code? why is this not displaying whole matrix?and how to sum whole matrix?
You're overwriting the matrix |Cmd| every iteration because of the line |Cmd=zeros(M:D)|. Take it outside of both |for| loops. ...

más de 7 años hace | 0

| aceptada

Respondida
Solving an equation on MATLAB
Can be solved using the symbolic toolbox, <https://au.mathworks.com/help/symbolic/solve.html>.

más de 7 años hace | 0

| aceptada

Respondida
Executing the while loop
When I run your code, after the first iteration |err=0.028062920372021|. Since this doesn't satisfy the condition |err<=0.00001|...

más de 7 años hace | 3

Respondida
How to add values into Matlab matrix and not overwrite it
You're overwriting the contents of |B| twice in each iteration of your |for| loop: B = zeros(n,1); % preallocate, results ou...

más de 7 años hace | 1

| aceptada

Respondida
How to have matrix values as a function of another variable
|h| and |u| are vectors since |t| is also a vector, hence why you get the error when trying to put them into the matrix |P|. ...

más de 7 años hace | 0

| aceptada

Respondida
qickyly change 3D matrix to 2D matrix
For the example you gave, the following also works: a=squeeze(A(1,1,:));

más de 7 años hace | 0

Respondida
Bisection Method Piecewise function
The function you have declared is called |bisection|, not |bisectionF|. When you want to call or use this function, you need to ...

más de 7 años hace | 0

Respondida
how to use for loop
Type |help for| in your Matlab command window, or look at the relevant <http://au.mathworks.com/help/matlab/ref/for.html documen...

más de 7 años hace | 0

Respondida
Assign different input using for loop
I edited three lines (the commented out ones), the code now allows you to enter a row vector of inputs and returns a row vector ...

más de 7 años hace | 0

Respondida
Where is the 2 hour introduction to Matlab self paced online course?
I think you might be looking for the <https://matlabacademy.mathworks.com/ MATLAB Onramp> course?

más de 7 años hace | 1

Respondida
I cant figure out why my function is giving me NaN and not an answer
The line |dsin=sum(terms)| isn't summing anything, since |terms| isn't a vector. You can either make it a vector, or initialise ...

más de 7 años hace | 1

| aceptada