Question in plotting same value for a range of values
3 次查看（过去 30 天）
Hi all, I am trying very hard to plot same values for a number of values, but no success. I request to you to help me. Here is my code:
stra= [ 0.9375, 0.8125, 0.6875, 0.5625, 0.4375, 0.3125, 0.1875, 0.0625];
stra is 1x8 array. Basically I want to plot value 0.9375 i.e. stra(1) for x=1 to 2 (x is values along x axix, stra is values along y axis). So, I am dividing x=1 to 2 (i=1 to 2) into 100 parts and assigning stra(1) to all, then plotting x and y with hold command. But I am not getting desired output. Also I understand that when i=8, there would be problem in j. However, I could not think another way. Can you tell me how I can do this task? Thanks in advance!